Wanting to get started with Ansible? Already have a Centos machine up and running or want to use a Centos machine? This post will provide a guided installation to get you up and running in no time.
Lets get started
In 3 steps we will have Ansible installed on your Centos 8 machine.
Step 1 – Install EPEL repository
You might have heard of EPEL before. It stands for Extra Packages for Enterprise Linux. No need to add any words I think :-).
sudo dnf -y install epel-release
Why are you not using yum
? Well, as far as I know all the RedHat related OS’s are switching to dnf
. The ‘old’ yum had difficulties handling python 3 and also the API documentation for yum
wasn’t up to date anymore.
Step 2 – Update packags
Good to have a new repository installed but the system doesn’t know yet what packages might be available. So we run the update command.
sudo dnf -y update
Step 3 – Install Ansible
Finally, after all this work, the time has come to install ansible. yes.
sudo dnf -y install ansible
Verify
Good that you made it till here. Ansible is now installed.
You can check your version using ansible --version
.
My version is 2.9.10, let me know in the comments what version was installed when you followed this procedure.
Thanks for reading and happy coding.
Stuart.
PS. My dear friend from saptube also made an instruction movie about this (in Dutch).