Changes between Version 14 and Version 15 of Csle2022/Agenda/Ansible


Ignore:
Timestamp:
Nov 18, 2022, 7:01:27 AM (2 years ago)
Author:
dushmantha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/Ansible

    v14 v15  
    3131Test internet connectivity.[[BR]]
    3232
    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.
     33This 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
     35Login and check IP addresses of all VMs.
     36
     37{{{
     38ip add
     39}}}
     40
     41If they are same, then change them accordingly. You may disable dhcp and assign static IP addresses according to your setups.
     42
     43{{{
     44vi /etc/netplan/00-installer-config.yaml
     45 enp0s8:
     46      addresses : [192.168.56.105/24]
     47:wq
     48netplan apply
     49}}} 
    3450
    3551Login using PuTTY.
     
    4056
    4157Connect all VMs to 'Internal Network'.
    42 
    4358
    4459{{{
     
    7388''In control node''
    7489
    75 Login as root to the node and install Ansible
     90Login as root to the node.
     91
     92Change the hostname.
     93
     94{{{
     95hostnamectl set-hostname controlnode
     96nano /etc/hosts
     97}}}
     98
     99
     100{{{
     101127.0.0.1 localhost
     102127.0.1.1 controlnode
     103}}}
     104
     105{{{
     106reboot
     107}}}
     108
     109Install Ansible
    76110
    77111{{{
     
    81115''In each managed node''
    82116
    83 Login as root to the node and install Ansible
     117Login as root to the node and change hostname. Each should have a unique hostname.
     118
     119{{{
     120hostnamectl set-hostname m1
     121nano /etc/hosts
     122}}}
     123
     124{{{
     125127.0.0.1 localhost
     126127.0.1.1 m1
     127}}}
     128
     129{{{
     130reboot
     131}}}
    84132
    85133{{{
    86134apt install python3.10
    87135}}}
    88 
    89136
    90137'''Setup Passwordless SSH'''