The control node installation

First, let us clarify the terminology we will use in the context of Ansible. We will refer to the virtual machine with Ansible installed as the control machine, and the machine is being managed as the target machines or managed nodes. Ansible can be installed on most of the Unix systems with the only dependency of Python 2.6 or 2.7; the current Windows is not supported as the control machine. Windows host can still be managed by Ansible, as they are just not supported as the control machine.

As Windows 10 starts to adapt Ubuntu Linux, Ansible might soon be ready to run on Windows as well.

On the managed node requirements, you may notice that Python 2.4 or later is a requirement. This is true for managing target nodes with operating systems such as Linux, but obviously, not all network equipment support Python. We will see how this requirement is bypassed for networking modules.

For Windows machine, the underlying modules are written in PowerShell, Microsoft's automation, and the configuration management framework.

We will be installing Ansible on our Ubuntu virtual machine, and for instructions on installation on other operating systems, check out the installation document (http://docs.ansible.com/ansible/intro_installation.html). Following you will see the steps to install the software packages.

$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
You might be tempted to just use pip install ansible for installation, but this will give you some problem down the line. Follow the installation instruction on the Ansible documentation page for your operating system.

You can now do a quick verification as follows:

$ ansible --version
ansible 2.2.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides

Now, we are ready to see an example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.141.27