Apr 10, 2019· 3 mins to read

How to Install Ansible Control Machine


How to Install Ansible Control Machine

In this article, we will see How to Install Ansible Control Machine.

Ansible Password- less SSH

Mainly, Ansible architecture consists of 2 types of nodes:

  • Ansible Control Node
  • 1 or more managed nodes.

Control Node

Above all, Control machine is where the Ansible automation tools are installed. The automation playbooks are executed from this control machine.

Managed Nodes

Managed nodes are the ones where the actual automation tasks happen. However, Managed nodes are sometimes called as hosts

control node executes the automation playbooks. Managed nodes are the ones where the actual automation tasks happen.

That is to say, tasks in ansible is a unit of actions in the automation playbook.

Here we will see how to install the control machine and its prerequisites

Pre-requisites:

  1. The Control machine can be installed only on Linux operating systems. It supports most of the flavors like Red Hat, Debian, CentOS, macOS, Fedora, Ubuntu, etc.
  2. Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) is needed to install the control machine.

Installation:

RHEL / CentOS:

Execute the following yum command to install Ansible on RHEL / CentOS control machine

$ sudo yum install ansible

install

The latest version of Ansible is installed with its dependencies

If the yum install says No package found, execute the following command to install additional packages repository

$ sudo yum install epel-release

repo

Fedora:

After that, execute the following yum command to install Ansible on Fedora control machine

$ sudo dnf install ansible

Ubuntu:

Execute the following yum command to install Ansible on Ubuntu control machine

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt-get install ansible

Install via PIP:

Above all, you can install Ansible using “pip” which is python installation manager. If pip is not installed with python, you can install it using the following command:

$ sudo easy_install pip

After that, execute the following command to install ansible

$ sudo pip install ansible

Installation Successful !!! In conclusion,  you can check the version with below command.

$ ansible --version

ver

To Learn more about Ansible

Copyright © Cloudnweb. All rights reserved.