How to install and run Ansible




     
In this article simply explained how to install ansible in an easy way. Ansible can only run on the Linux platform. Which is not available for windows 10 but you can install on Windows's WSL for practicing.


Prerequisite for Ansible

  • Linux Operating System
  • Python 3.x.x 

Run the below codes to install the global  version of Ansible

Gnome Terminal
[anand@linux-pc ~]:$ sudo python get-pip.py
[anand@linux-pc ~]:$ sudo python -m pip install ansible

If you have Python 2.x and Python 3.x both versions try the below commands avoid misconfiguration
Gnome Terminal
[anand@linux-pc ~]:$ sudo python3 get-pip.py
[anand@linux-pc ~]:$ sudo python3 -m pip install ansible
Once Ansible successfully installed run the below commands. If everything is good, you will get the output as per the below bash output
Gnome Terminal
[anand@linux-pc ~]:$ ansible --version

ansible 2.9.11 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/kali/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/kali/.local/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.5 (default, Aug 2 2020, 15:09:07) [GCC 10.2.0]


Tags

Post a Comment

0Comments
Post a Comment (0)