U1.24 Ubuntu Quick Start (QS): Ansible installation summary - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki
-
Pre-installed DHCP in the virtual environment (for example, a hardware implementation of a DHCP server in a modem)
-
Deploy three Ubuntu 20.04 TLS virtual machines. Consult the articles U1.01 and U1.02
- Device name = u200401, ip = 192.168.100.8
- Device name = u200402, ip = 192.168.100.9
- Device name = u200403, ip = 192.168.100.10
-
For each machine u200401, u200402, u200403
- run the command python3 --version
- In our case it returns : Python 3.8.10
- run the command python3 --version
-
For each machine u200401, u200402, u200403
- run the command
sudo apt install openssh-server
- For the machine u200401
- run the commands (no sudo prefix for the first four commands and for the last command)
- Note: with the current user you can log into each machine
ssh-keygen
ssh-copy-id 192.168.100.8
ssh-copy-id 192.168.100.9
ssh-copy-id 192.168.100.10
sudo apt-get install python3-pip
python3 -m pip install --user ansible
- For the machine u200401
- run the commands (no sudo prefix for the command)
- copy command output and add /bin to the end of the string
- let's call the resulting string as YOUR_OUTPUT_WITH_BIN steps 151-15.3
- copy command output and add /bin to the end of the string
- run the commands (no sudo prefix for the command)
python -m site --user-base
- For the machine u200401
- run the commands (no sudo prefix for the command)
- YOUR_OUTPUT_WITH_BIN was defined above steps 151-15.3
- run the commands (no sudo prefix for the command)
export PATH="$PATH:YOUR_OUTPUT_WITH_BIN"
- For the machine u200401
- run the commands
sudo mkdir /etc/ansible
sudo nano /etc/ansible/hosts
- For machine ** u200401 ** fill /etc/ansible/hosts file with data
192.168.100.8
192.168.100.9
192.168.100.10
- For the machine u200401
- run the command (no sudo prefix)
ansible all -m ping
- here is a result