Ansible Installation and configuration
- Lab Setup:

For AWS Users:
- Create two ubuntu 20.04 instances






- AWS machines have passwords disabled by default. So lets enable password
In this /etc/ssh/sshd_config => PasswordAuthentication no => yes
# Restart sshd service
sudo systemctl restart sshd

* Lets create a user called as devops with password as devops on both Anisble control Node and Node-1
sudo adduser devops
- Now logout and check for password authentication.
- Lets add sudo permissions for devops user.
# login as ubuntu user
sudo visudo


* Lets do the same setup on the node 1
* enable password authenticat
* create a devops user
* add this user for sudo permissions without prompting for password.
* Login into ansible control node and install ansible Refer Here for the official documentation and Refer Here for installation steps
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible -y
ansible --version


* Now lets create a inventory file called as hosts
172.31.35.153

For Azure Users:
- Create two ubuntu vms in the same resource group
- Since we can set the username and password during creation lets use the same user for ansible
- On the node and ansible control node lets disable password prompt while executing sudo commands
sudo visudo
- Install ansible on the control node

