Learn Ansible Quickly

My RHCSA is expiring in a few months and I decided to advance a step in Red Hat’s certification path. Following the release of Red Hat Enterprise Linux 8, some changes were made into it, they split Red Hat Certified Engineer in two branches: the first one was the same it was before RHEL 8 launch, focused on administration tasks on RHEL 7, but the new one is focused on automation using Ansible on RHEL 8 systems.

But the RHEL 7 path (EX300) was due on July 1, 2020, so now, the only option is the RHEL 8 (EX294) path.

redhat cert path

We use ansible at work, but I’m not a proficient user and I’m pretty sure my employer is not going to pay me the RH294 course, so I’m on my own on this. The list of objectives for this exam is pretty extensive although I’m a seasoned sysadmin and I pass my RHCSA with a perfect score of 300, the ansible related objectives freak me.

So I looked for a book which covers all the objectives, and I found Sander Van Vugt’s Red Hat RHCE8 (EX294) Cert Guide that looks promising and Pearson IT Certification is a well known editor, but it costs about 40€ printed and 22€ on kindle, but I’m sure it’s worth it if it fits your budget.

Then I found Ahmed Alkabary’s Learn Ansible Quickly, which was only 3.3€ for Kindle, it also claims to cover all ansible’s objectives (not sysadmin’s) for the EX294, and three euros was an amount I could bet.

learn ansible quicky cover

And it had a penguin with a red hat on the cover.

The first chapter was how to set the lab environment, and I thought it was a good moment to try the no-cost Red Hat subscription for developers because the exam is based on it. So I logged in on Red Hat’s website and download the ISO file.

Then I tried to register my vm from the Connect to Red Hat Anaconda’s screen, but it failed to register. I wondered why, but after reading slowly several Red Hat’s pages I discovered that you actually must download the ISO file from the Red Hat Developer portal’s linux section.

download rhel8

It automatically created a subscription on your developer account (I didn’t need to download the image again), and I was able to finish the registration process on the vm and complete the installation.

screenshot connected to redhat

The rest of the suggested lab environment was tree CentOS 8 machines and one Ubuntu, in order to show how heterogeneus systems can be managed at once with ansible.

The first exercises were about the basics: installing the ansible package on the control node, creating a user on each client node, sharing ssh keys and setting up sudo permissions.

Once everything was in place, the second chapter was about setting up the inventory, a few ansible options and running a couple of ad-hoc commands.

The third chapter was an introduction to playbooks, including tasks from other file or complete playbooks, and how the parameters --syntax-check, --list-hosts, --list-tasks and --check can help to understand what’s going to happen when the playbook is run.

I’m looking forward for the next chapters: variables, loops, decisions, etc. because those are the new topics for me.