Ansible

https://docs.ansible.com/ansible/latest/index.html

Installing ansible

sudo apt update sudo apt install software-properties-common sudo apt-add-repository ppa:ansible/ansible sudo apt update sudo apt install ansible

Setting up target

create a Host file refer to this https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html

hosts
all: # group of remote hosts: 172.16.100.135: 172.16.101.124:

Preparing key file

You should use the *.pem file you downloaded when you created the key

Your ssh key must not be too open 

sudo chmod 600 <path-to-key>

Setting up playbook

Here is an example of a simple playbook. you can refer to ansible documentations for different providers. 



playbook.yml

Running ansible-playbook

Example