Ansible Configuration
- The configuration done so far is represented as shown below

- Lets create an inventory file with the Node1 details. Create a file called as hosts with the following content
172.31.17.152
- To check the connectivity for ansible control node with Node which internally checks the connectivity and ssh login ansible has a special command
ansible -i <inventory file path> -m ping --ask-pass all
- So lets execute this command on control node

- Now lets add one more entry into the inventory
172.31.17.152
localhost

- Now entering password every time might not be good option for automating deployments, so lets try to use key based authentication
- To Create a key based authentication b/w ansible control node and nodes
- Create a key pair in Ansible control node
ssh-keygen
- Copy the public key to the node(s) from ansible control node
ssh-copy-id <username>@<ipaddress>
- Now lets try to login from ansible control node to node just by using ip address

- Now lets try to ansible connectivity check without ask password
ansible -i hosts -m ping all

-
Now lets try to copy keys to localhost

-
Setup done so far

-
Now lets add the new centos 7 node and configure it to the ansible control node
- for steps view recording

- for steps view recording
-
Configuration overview

-
Exercise:
- YAML & JSON Tutorial Refer Here
