How to install Ansible in Debian Linux version 11
Today, we are going to talk about the easiest way to install and maintain Ansible
inside Debian Linux using the default main repository. I'm Luca Berton and welcome in today's episode of Ansible Pilot
Today, we are going to talk about how to install Ansible in Debian
The good news is that Ansible is included in the default repository
so you could install it simply with your usual package manager apt
You could extract the latest version of Ansible in the main default repository
Demo. Are you ready to make your hands dirty? Let's jump in a quick live demo about how to install the latest version of Ansible
using apt and the main repository
One website that could be useful to evaluate the available version of any package is packages.debian.org
If you scroll down, there is a search place where you can type Ansible, for example
and you can see all the available packages. For example, we have one exact hit for BullsSea
that is exactly our Debian 11 and we can have more information about the package
exactly the available version 2.10 and we can see all the available dependencies
also what service is provided the official maintainers and more information about the package
As you can see, I'm scrolling down and we see that also the expected download and install has arrived
So, it's very useful to take a look on this website every now and then
But now, let's jump to the console. Welcome to my console. I have a fresh Debian 11 installed in my laboratory
First of all, let me connect via SSH. DevOps is my username and debian.example.com is my target host
It's a fresh machine, so I need to accept the SSH key
So, let me switch to root because it's the only user that can install the packages
Let me print the ATC OS release and ATC Debian version So, it's 11.1 Bullseye
First of all, let me update, refresh the repository with apt.get update
Here we are, we have the latest available packages. Let me search for Ansible with apt-cache search Ansible
and we see all the available packages. With apt-cache show Ansible we have more information on the available packages
And we see that the latest version is 2.10. We can see also the library dependency, mostly Python 3
and also the maintainer of the package. We see that this package is pretty updated
and now, are you ready to have fun? We can proceed with installation with apt.get install Ansible
Here we are. The apt package manager is giving us a summary of 32 MB of downloaded
and 280 MB after decompressing the archives. The speedup depends by the performance of your machine
and also the performance of the network. In my case, it's already downloaded and apt, the package manager
is taking care of installing on the system, which satisfies all the required dependencies
and now it's performing the Ansible installation. As a double check, we can execute now Ansible dash dash version
so we can verify that the package is successfully available in my system
Here we are, this small recap may sound familiar that is also listing the current version
and the available Python interpreter. With apt list, we can have a recap of the installed version of Ansible
In my case, I have 2.10.7 and dpkg dash l is listing the current exact version of the package installed
In my case, it's 2.10.7 and the beauty of this is that the package comes with the main repository
which means that it's present in the distribution and maintained with it
So we simply need only to update the package like usual and also upgrade our distribution to maintain Ansible up to date inside Debian
So, good job guys! Now you know how to install the latest version of Ansible in Debian
using the main repository. Thank you for watching and if you enjoyed this video
give me a thumbs up and see us on the next episode of Ansible Pilot
This video is part of our Ansible automation program. Sign up today on www.ansiblepilot.com
for uninterrupted exclusive videos and so much fun