Changes between Version 14 and Version 15 of Csle2022/Agenda/Ansible
- Timestamp:
- Nov 18, 2022, 7:01:27 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Csle2022/Agenda/Ansible
v14 v15 31 31 Test internet connectivity.[[BR]] 32 32 33 This setup needs 3 VMs (one as control node and the others will be managed nodes). Import the same Vm image and setup 3 VMs accordingly. 33 This setup needs 3 VMs (one as control node and the others will be managed nodes). Import the same VM image and setup 3 VMs accordingly. 34 35 Login and check IP addresses of all VMs. 36 37 {{{ 38 ip add 39 }}} 40 41 If they are same, then change them accordingly. You may disable dhcp and assign static IP addresses according to your setups. 42 43 {{{ 44 vi /etc/netplan/00-installer-config.yaml 45 enp0s8: 46 addresses : [192.168.56.105/24] 47 :wq 48 netplan apply 49 }}} 34 50 35 51 Login using PuTTY. … … 40 56 41 57 Connect all VMs to 'Internal Network'. 42 43 58 44 59 {{{ … … 73 88 ''In control node'' 74 89 75 Login as root to the node and install Ansible 90 Login as root to the node. 91 92 Change the hostname. 93 94 {{{ 95 hostnamectl set-hostname controlnode 96 nano /etc/hosts 97 }}} 98 99 100 {{{ 101 127.0.0.1 localhost 102 127.0.1.1 controlnode 103 }}} 104 105 {{{ 106 reboot 107 }}} 108 109 Install Ansible 76 110 77 111 {{{ … … 81 115 ''In each managed node'' 82 116 83 Login as root to the node and install Ansible 117 Login as root to the node and change hostname. Each should have a unique hostname. 118 119 {{{ 120 hostnamectl set-hostname m1 121 nano /etc/hosts 122 }}} 123 124 {{{ 125 127.0.0.1 localhost 126 127.0.1.1 m1 127 }}} 128 129 {{{ 130 reboot 131 }}} 84 132 85 133 {{{ 86 134 apt install python3.10 87 135 }}} 88 89 136 90 137 '''Setup Passwordless SSH'''