Monday, 18 June 2018

Working with Ansible

Consider the following terms while using Ansible.

Control Node
 Control host is a machine where we have installed the Ansible. This control host controls all remote nodes.

Managed hosts
    Remote nodes are named as managed hosts.

Inventory file
    This is the default ansible 'hosts' file. It is a collection of nodes with related datas and grouping that ansible can connect and manage.


1. Setup ssh key-based authentication. (Ansible is a agent-less tool and use SSH protocol to deploy modules on managed hosts.)

2. Install python on managed hosts

Setup ssh key-based authentication

Generate ssh key

copy ssh key file to managed hosts

checking auto login from control node to remote nodes.

Adding managed hosts in Inventory file

[root@sysads ~]# vim /etc/ansible/hosts


Testing with ansible modules