Ansible – Part 2 – Installing Ansible
Latest posts by Gini Gangadharan (see all)
- How to Create Scheduled Snapshots in Google Cloud Platform - January 16, 2020
- GNS3 VM – How to Enable KVM Support - December 26, 2019
- How to Request Resource Quota Increase in Microsoft Azure - November 8, 2019
You may refer installation doc from official document as well.
Controlnode is just the machine where we install the Ansible program and will contain copies of your project file including ansible playbooks. It can be a workstation, a virtual machine or a dedicated server in the environment.
- No specific HW requirements for control node server
Linux/Unix systems only (Windows not currently supported) Software
- Ansible (ansible.com/get-started)
- Python 2.6 or later
- Python2-winrm (0.2.2 or later) provides pywinrm python package
These are listed servers or nodes in the inventory – defined as static or via dynamic inventory scripts – on which Ansible commands or playbook tasks need to be executed.
- Linux managed hosts need to have Python 2 (2.4 or later) installed for most modules to work.
- python-simplejson (if old RHEL5)
- libselinux=python (if SELinux is enabled)
- Most of the modules specifically designed for Microsoft Windows hosts require PowerShell 3.0 or higher on the managed host rather than Python.
- PowerShell remoting enabled.
Check installed python version
yum list installed python
yum install -y ansible
Test installed version
[[email protected] dep-install]$ ansible --version
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
Ansible can be installed via “pip”, the Python package manager. If ‘pip’ isn’t already available in your version of Python, you can get pip by:
$ sudo easy_install pip
Then install Ansible with
$ sudo pip install ansible
$ sudo apt-get install ansible
If CentOS, configure EPEL repo (Extra Packages for Enterprise Linux)
sudo yum -y install epel-release
Want to know more about Ansible ? Read next part on Deploying Ansible
See all parts of Automation with Ansible Guides here