Linux - Ansible

  • inventory
  • add-hoc commands
  • playbooks
  • yaml
  • python 2.6 +

Installation

sh# apt-add-repository ppa:ansible/ansible
sh# apt update
sh# apt install ansible

Configuration

Inventory

First thing we have to do is to create an inventory of the nodes we want to manage. To do so, we have to add the hostnames/ip-addresses to the file /etc/ansible/hosts.

/etc/ansible/hosts

node-1.fqdn
node-2.fqdn
<ip address 1>
<ip address 2>
...

Usage

Ad-Hoc Commands

sh# ansible all -m ping

Next, we have to define how we want to manage the nodes

  • polling nodes