Skip to content
Related Articles

Related Articles

Ansible Introduction and Installation in Linux
  • Difficulty Level : Basic
  • Last Updated : 14 Sep, 2020

Ansible is an open-source IT engine that automates application deployment, cloud provisioning, intra service orchestration, and other IT tools. 
It is an automation and orchestration tool popular for the following reasons: 

  • Simple to Install.
  • Free and open source.
  • Lightweight and consistent.
  • OpenSSH security features make it very secure.

Ansible Concepts 

  1. Control node: 
    Commands and Playbooks can run by invoking /usr/bin/ansible or /usr/bin/ansible-playbook, from any control node. You can use any computer that has Python installed on it as a control node. However, one can not use a computer with Windows OS as a control node. One can have multiple control nodes.
  2. Managed nodes: 
    Also sometimes called “hosts”, Managed nodes are the network devices (and/or servers) you manage with Ansible.
  3. Inventory: 
    Also sometimes called “hostfile”, Inventory is the list of Managed nodes use to organize them. It is also used for creating and nesting groups for easier scaling.
  4. Modules: 
    These are the units of code executed by Ansible. Each module can be used for a specific purpose. One can invoke a single module with a task, or invoke several different modules in a playbook.
  5. Tasks: 
    The units of action in Ansible. One can execute a single task once with an ad-hoc command.
  6. Playbooks3: 
    These are the ordered list of tasks that are saved so you can run those tasks in that order repeatedly. Playbooks are written in YAML and are easy to read, write, share and understand.


NOTE: In order to install ansible, the system must have python preinstalled. 
Open up Terminal and execute the following commands.:

1. Add the Ansible Repository.

sudo apt-add-repository -y ppa:ansible/ansible 

Add ansible repository

 2. Update the system repository listings.

sudo apt-get update

update system repos

 3. Install the ansible packages.

sudo apt-get install -y ansible

instal ansibleinstall ansible

For more details visit Ansible complete documentation. 


My Personal Notes arrow_drop_up
Recommended Articles
Page :