There are a few different ways of installing Ansible on Ubuntu 18.04. However, I am only going to cover one of them here. While there are packages available for Ubuntu from which you can install with apt, they tend to quickly become out of date and are typically behind the current release.
Because of this, we will be using pip. The first thing to do is install pip, and this can be done by running the following command:
$ sudo -H apt-get install python-pip
Once pip is installed, the instructions for installing Ansible are the same as installing on macOS. Simply run the following command: ...