Installing Python:
Ansible and its modules are built on python, so we have to install python in our Ubuntu machine.
To install python in your system execute below commands as a root user.
sudo –i
apt-get install python-minimal
apt-get install python3
Check Python Version:
Check your python version with the below command.
python --version
Python 2.7.12
installing Ansible on Ubuntu:
After installing python in your machine install ansible. To install ansible run below commands as a root user.
Ansible PPA:
sudo -i
apt-get update
apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible
apt-get update
apt install ansible
Ansible Version:
After installing Ansible, Check your ansible version with the below command.
ansible --version
ansible 2.6.3
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
No comments:
Post a Comment