https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html#installing-ansible-on-ubuntu
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible -y
scp -i "sadik.pem" sadik.pem [email protected]:/home/ubuntu/keys
[devservers]
server1 ansible_host=3.82.157.147
server2 ansible_host=3.93.143.85
server3 ansible_host=100.24.22.162
[webservers]
web1 ansible_host=192.168.1.101 ansible_ssh_private_key_file=/path/to/private_key.pem
web2 ansible_host=192.168.1.102 ansible_ssh_private_key_file=/path/to/private_key.pem
adding vars for all servers from all groups
[all:vars]
ansible_python_interpreter=/usr/bin/python3
ansible_user=ubuntu
ansible_ssh_private_key_file=/home/ubuntu/keys/sadik.pem
ansible-playbook --inventory inventory/ansible-import-roles-playbook/hosts ansible-import-roles-playbook.yml
type -a apache2
ssh -i /c/Users/VIgnan/Downloads/key-pair.pem
[email protected]