This article will guide you on installing latest version of Ansible on a Debian 9/10 host. For this article I will be installing Ansible version 2.11.12 on a RaspberryPi 4 running on Debian 10 release.
Firstly start off by updating the the update cache
# sudo apt-get update
Then Install Ansible from the default Debian Repo
# sudo apt install ansible -y
Once installed confirm the version installed
# ansible --version
If its not the latest version as you expected, you can upgrade the version to the latest using the command below. As of writing this article the latest version is 2.11.12
# python3 -m pip install --user ansible-core==2.11.12
Again confirm the version installed and it should give you the latest version.
# ansible --version
Output:
$ ansible --version
ansible [core 2.11.12]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/farooq.ahmed/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/farooq.ahmed/.local/lib/python3.7/site-packages/ansible
ansible collection location = /home/farooq.ahmed/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
jinja version = 2.10
libyaml = False
That’s about it. If you face any issues, please get in touch via Contact Us and we will get back to you.