Changes between Version 11 and Version 12 of Csle2022/Agenda/Ansible
- Timestamp:
- Nov 17, 2022, 11:25:29 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Csle2022/Agenda/Ansible
v11 v12 7 7 Participants are requested to have a computer with Windows 8/10/11 (8GB RAM, 25GB free disk space) with Virtualbox (version 6 or higher) hypervisor and PuTTY installed.[[BR]] 8 8 9 10 9 In Virtualbox, 'Extension pack' should be installed. 11 10 12 11 A wired internet connection is preferred. 13 14 12 15 13 [[BR]] … … 26 24 27 25 May have to create Virtualbox Host-Only Network Adapter[[BR]] 28 29 26 30 27 {{{ … … 75 72 }}} 76 73 77 ''In managed node'' 78 79 Copy the ssh keys generated on the master node and save it in the authorized_keys file on both worker nodes. 74 Copy the ssh keys (the output of the above command) generated on the master node, paste and save it in the authorized_keys file on both managed nodes. 80 75 81 76 {{{ … … 83 78 }}} 84 79 85 '''Create the Playbook - In control node''' 80 81 '''Add the managed nodes to control node Ansible hosts file''' 82 83 Login as root to the control node. 84 {{{ 85 nano /etc/ansible/hosts 86 }}} 87 88 Insert the following with the required changes according to your setting. 89 {{{ 90 [Dbservers] 91 92 db1 ansible_ssh_user=docker ansible_ssh_host=<first managed node IP address> 93 94 db2 ansible_ssh_user=docker ansible_ssh_host=<second managed node IP address> 95 }}} 96 97 98 {{{ 99 Verify connectivity 100 }}} 101 102 {{{ 103 ansible -m ping Dbservers 104 }}} 105 106 '''Create the Playbook - In control node - As root''' 86 107 87 108 {{{ … … 132 153 }}} 133 154 134 '''Run the Playbook - In control node '''155 '''Run the Playbook - In control node - As root''' 135 156 136 157 {{{ … … 138 159 }}} 139 160 161 '''Verify results - In managed nodes''' 162 163 {{{ 164 mysql -u root -p 165 show databases; 166 }}}