How does Ansible work?
Ansible translates Ansible playbooks into commands that are run over SSH, which has several benefits when it comes to managing Unix-like environments:
- Most, if not all of the Unix-like machines you are administering will have SSH running by default.
- Relying on SSH means that no agent is required on the remote host.
- In most cases no additional software needs to be installed as Ansible requires Python 2.6 in order to operate. Most, if not all distributions of Linux have this version (or greater) installed by default.
- Ansible does not require a master node. It can be run from any host that has the Ansible package installed and sufficient SSH access.
- Although running Ansible in a cron job is possible, by default Ansible only runs when you tell it to.
The installation of the Ansible package is only required on the host that generated the SSH key.
If you run CentOS or Red Hat, you need to configure Extra Packages for Enterprise Linux (EPEL) repositories :
sudo yum install epel-release -y
Then you can install Ansible with yum :
sudo yum install ansible -y
For Ubuntu / debian based systems, you can install Ansible from the PPA :
sudo apt-get install software-properties-common -y
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible -y
Now you can check Ansible version :
Thank you for reading this article.
Was this helpful?
0 / 0