DevOps | Scripts | Automation

Ansible

Ansible server installation on Ubuntu – Part II

In part-I, we have read about preparing the demo environment for the ansible server, removing Python2 or old versions, and installing python3 latest version.

In this article, we will create the Ansible server on the Ubuntu background. The first step, run the below command to download package information from the repository or the configured sources and updates.

sudo apt-get update

Second, install the packages and their dependencies and add ansible repository to PPAsource..

sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible

The latest ubuntu server may throw an error or warning for the second command (ppa:ansible/ansible). You can ignore it. If the Python3 is not installed as per instruction in the part-I , you can install it now.

sudo apt-get install python3

You can now start ansible installation on the node.

sudo apt install ansible

Once the ansible is installed, you can check the version installed using,

ansible --version

You can see the ansible and the python version.