There are a few of ways to install ansible. For the rest of these articles I’ll be running Ansible on Centos 7.
Install Ansible using yum
This is done like this:
$ yum install epel-release $ yum install ansible
Then check the version of ansible installed:
$ ansible --version
It is actually recommended to install ansible on all client’s and just the controller. That way the clients ends up installing all the python related dependencies.
However the downside with this approach is that the version of ansible that get’s installed is a few versions behind the latest stable version.
Install Ansible from source
To install a newer version, you can run this script as the root user:
After running the above script, log into the machine as the user, “ansible” and password “vagrant”.
Then check what version of ansible