What needs to provided to Ansible
- Desired State:
- The Desired state is written in YAML and is called as Playbook.
- List of Nodes:
- The nodes where the playbook has to be executed, this is referred as inventory
- Credentials:
- Credentials can be passed as part of playbook/inventory/commandline
Setup of Ansible
Ansible Control Node
- This component takes the inputs mentioned above to execute playbooks on the nodes
- This Node is a linux vm or physical machine and we install ansible.
-
Credentials:
- Username
- Password
- Key Based Approach
-
Lab Setup:
- AWS (ubuntu):


- Azure (Centos)


- AWS (ubuntu):
-
Ansible Setup:
- Refer Here for any os installation and Refer Here for ubuntu
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

- centos: Refer Here
sudo yum install epel-release -y
sudo yum install ansible -y
- The above commands didnt work in Centos 8 distribution. (To be fixed)
Exercise
- Refer Here for json and yaml tutorial.
Note:
- Installing Necessary Softwares on your System Refer Here
