U1.22 Ubuntu Quick Start (QS): Installing Ansible. - 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)
- Step 1: Deploy three Ubuntu 20.04 TLS virtual machines. Consult the articles U1.01 and U1.02
- Step 2: Set device name of the first Ubuntu virtual machine: u200401
- Step 3: restart u200401
-
Step 4: for u200401 show ip address
- run the command ip a
- In our case it returns : 192.168.100.8
- run the command ip a
- Step 5: Set device name of the second Ubuntu virtual machine: u200402
- Step 6: restart u200402
-
Step 7: for u200402 show ip address
- run the command ip a
- In our case it returns : 192.168.100.9
- run the command ip a
- Step 8: Set device name of the third Ubuntu virtual machine: u200403
- Step 9: restart u200403
-
Step 10: for u200403 show ip address
- run the command ip a
- In our case it returns : 192.168.100.10
- run the command ip a
Click to show the picture
-
Step 11: for u200401, u200402, u200403 machine
- run the command python3 --version
- In our case it returns : Python 3.8.10
- run the command python3 --version
Click to show the picture
-
Step 12: for u200401 machine ONLY
- run the command
sudo apt-get install python3-pip
-
Step 13: for u200401 machine ONLY
- run the command (no sudo prefix for the command)
python3 -m pip install --user ansible
Click to show the picture
-
Step 14: for u200401 machine ONLY
- run the command (no sudo prefix for the command)
python3 -m pip install --user paramiko
Click to show the picture
-
Note 1: Installing with --user is recommended unless you understand fully the implications of modifying global files on the system. Read the article Installing Ansible with pip
- running commands without sudo
- python3 -m pip install --user ansible
- python3 -m pip install --user paramiko
- after the installation is complete, if you run the commands,
- ansible version
- we get an error
- ... not found ...
- running commands without sudo
-
Step 15.1: for u200401 machine ONLY
- read the article Installing to the User Site
-
Step 15.2: for u200401 machine ONLY
- run the command
- no sudo prefix for the command
- run the command
python -m site --user-base
Click to show the picture
-
Step 15.3: for u200401 machine ONLY
- copy the command output of the step 15.2
- add /bin to the end of the command output
- run the command where YOUR_OUTPUT_WITH_BIN is a string you created above
- no sudo prefix for the command
export PATH="$PATH:YOUR_OUTPUT_WITH_BIN"
Click to show the picture
-
Step 6: Test
- run the command (no sudo prefix for the command)
ansible --version
Click to show the picture
- Note 2: Read the article Installing Ansible on Ubuntu