We're going to install Ansible on our management host and then use it to connect to itself to test basic Ansible commands.
- First of all, we're going to install Python 2.7, since it may not be installed as the default Python interpreter in Ubuntu 16.04:
ubuntu@ubuntu-xenial:~$ sudo apt-get install -y python2.7 python-pip
- Then, we'll install Ansible using the Python package manager:
ubuntu@ubuntu-xenial:~$ pip install ansibleCollecting ansible[...]Successfully built ansible pycryptoInstalling collected packages: MarkupSafe, jinja2, PyYAML, six, pycparser, cffi, pynacl, pyasn1, bcrypt, ipaddress, idna, asn1crypto, enum34, cryptography, paramiko, pycrypto, setuptools, ansibleSuccessfully installed MarkupSafe-1.0 PyYAML-3.12 ...