What is Ansible?

Ansible is an amazing Automation tool that we can use in order to create custom scripts called Playbooks. These Playbooks can do various things ranging from gathering configuration backups, making security changes on devices as well as doing bulk configurations. This means you spend less time on individual devices doing configurations on a per-device basis and more time at looking on how to improve your network!

Ansible first time installation (Ubuntu)

You can install Ansible on a variety of different distributions, however, we will be covering how to install this automation tool on an Ubuntu Desktop to get quickly started please feel free to watch the YouTube video below giving you step by step instructions in real-time or follow the commands at the bottom of the video in your Terminal window to do the installation.

Ansible configuration commands in the terminal

You can manually install Ansible through the terminal window by getting some updates for your system and specifying the correct ppa. Once done you will be able to install Ansible, please follow the below commands in order to do the setup.

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

Once the setup is complete there are a few things you can do to verify that ansible has installed successfully, firstly verify that the ansible folder has been added to your system by going to the below directory

cd /etc/ansible

If you can change to this directory you can verify that the correct files are created by running the following command:

ls -la

Should have have an ansible.cfg file as well as hosts file this means you have all the base components ready to start working on ansible. You can also verify the version of Ansible you are using by running the below command, this will be useful to verify which modules you may be able to use with Ansible.

ansilbe --version

This wraps up the initial installation for Ansible on Ubuntu.

Admin bar avatar

The Network Berg

Network solutions specialist with over 12 years of experience in the computer networking landscape. Involved with solution design, project planning and implementations on Enterprise and ISP networks.