Ansible is an IT automation tool provided by RedHat. It is designed to operate agentless, which means that nodes don’t need separate agent applications to be used in an Ansible automation.
Ansible runs playbooks which execute a series of tasks on a given set of hosts. Tasks are performed in order. It is supposed to be easy to use and understand so that anyone in an IT organization can read a playbook and know what it is doing.
There’s a number of reasons why, rooted generally in the use cases Ansible is known for:
I refered to the latest Ansible community installation guide to figure out what I needed to do to get the tool working on my cluster.
Because Ansible is agentless, I only need a single control node to be able to run playbooks or ad-hoc tasks on managed nodes.
I installed Ansible on
node1 using the system package manager
sudo apt-get install ansible
Ansible allows users to define lists of hosts as inventory.
node1 I opened
/etc/ansible/hosts which is the file containing the hosts I want to run playbooks on and added my cluster. This file has examples of how to add inventory. Following one of those examples resulted in this straightforward definition of my cluster.
At this point I am ready to see whether Ansible is set up and working properly.
ansible all -m ping
This runs the
ping module against all hosts in inventory.
As depicted below, all the hosts were successfully
I’ve got a control node ready to execute playbooks on the cluster.
The only other cluster-related topic I want to delve into now is Kubernetes, so that is what I’ll be working to set up this week.