Over the last few years, Ansible has rapidly become one of the most popular IT automation tools in the world. We’ve seen the open source community expand from the launch of the project in 2012 to over 1200 individual contributors nowadays. This article describes the Red Hat Certified Specialist in Ansible Automation exam; it also provides helpful tips that could aid during the exam preparation process.
Who is supposed to take it?
Red Hat Certified Specialist in Ansible Automation exam is for you if any of the below bullet points identifies you:
- You are a system administrator who manages a large number of servers.
- You work in a DevOps environment and want to automate everyday tasks and routines.
- You are a developer who needs to automate into your application development lifecycle.
- You are interested in becoming a Red Hat Certified Architect.
What are the subjects covered?
As a candidate for the Red Hat Certified Specialist in Ansible Automation title, you are expected to understand the following concepts:
- Core components of Ansible that includes: inventories, modules, variables. Facts, plays, playbooks, configuration files.
- Installation of Ansible control node and Ansible managed nodes.
- Ad-hoc Ansible commands.
- Plays and playbooks.
- Ansible modules for managing software packages, services, firewall rules, file systems, storage devices, file content, archiving, scheduled tasks, security, users, and groups.
- Creating Ansible templates.
- Managing roles.
- Using ansible vault to protect sensitive data.
You can visit the official website where Red Hat published study points in detail:
How do you prepare for it?
The Red Hat Certified Specialist in Ansible Automation, like any other Red Hat exam is a performance-based exam. During the test, you will receive an SHH access to a test environment and a set of tasks that you should complete. Therefore the best way to prepare for the exam is to practice. Based on the exam curriculum, I have created a list of tasks that will help understand major Ansible concepts and significantly increase your success odds. The list is shown below:
Part 1. Configure Ansible environment:
- On your control node, install necessary Ansible packages.
- Create a static host inventory file that contains two groups: webservers and dbservers.
- Configure Ansible to use the inventory file you created as a default inventory file.
- On both control node and managed nodes, configure Ansible user with the ability for password less privilege escalation.
- To Generate and distribute ssh-keys so control Ansible user on a control node can connect via ssh to worker nodes without a password.
- Set the default number of forks to 3.
Part 2. Use ad-hoc Ansible commands.
- Ping a node using ad-hoc Ansible commands.
- Install a package using ad-hoc Ansible commands.
- Create a file using ad-hoc Ansible commands.
- Change file properties using ad-hoc Ansible commands.
- Copy a file from a control node to a worker node using ad-hoc Ansible commands.
- Create a Linux user using ad-hoc Ansible commands.
- Create a Linux group. Add a Linux user using ad-hoc Ansible commands.
- Create a firewall rule that allows all traffic using ad-hoc Ansible commands.
- Create a firewall rule that allows only port 22 using ad-hoc Ansible commands.
- Enable a Linux service using ad-hoc Ansible commands.
- Disable a Linux service using ad-hoc Ansible commands.
- Restart a Linux service using ad-hoc Ansible commands.
- Mount a drive, create a file system using ad-hoc Ansible commands.
- Create an archive using ad-hoc Ansible commands.
- Extract an archive using ad-hoc Ansible commands.
- Append a line into a file of your choice using ad-hoc Ansible commands.
- Create an LVM volume using ad-hoc Ansible commands.
Part 3. Playbooks
Create a set of simple Ansible playbooks that perform the same tasks that are mentioned in step 2.
Part 4. Use different Ansible structures to control play execution
- Run an arbitrary command and register its output as a variable. Print this variable.
- Create several users on managed nodes using loops.
- Create a playbook that installs apache on the webservers group, uploads index.html, and restarts apache only when index.html is changed.
- Create one more playbook that appends the arbitrary line to index.html in case hostname is equal to tiger.domain.com (replace tiger.domain.com with hostname of one of your managed nodes).
- Create a playbook downloading index.html via URL from all nodes and ignores nodes that do not have index.html.
- Create a playbook that downloads index.html via URL from all nodes and prints a custom error message if index.html does not exist on a node.
- Create a playbook that uploads blue.txt to all nodes when the blue option is specified in the tags, and uploads green.txt to all nodes when the green option is specified in the tags.
- Create a playbook that overrides a default number of forks with 10.
- Create a playbook that is applied to only 1 host at first and to the rest of the servers after in the 10% increment.
- Create a playbook that will stop running in case of having errors on more than 30% of hosts.
- Create a playbook that creates a file with the host’s IP address on each host.
- Create a playbook that accepts a path to a file as a variable and writes a list of IP addresses to that file.
- Create a playbook that pastes a VAR into a file using J2 template.
- Create a custom fact.
Part 5. Ansible roles
- Create an Ansible role that installs Apache HTTPD server and distributes templated configuration files to each managed node.
- Create an Ansible role that installs PHP and uses the apache role created during the previous step as a dependency.
- Install Elasticsearch using a role from the Ansible galaxy
Part 6. Ansible vault
- Create a text file, encrypt it using Ansible-vault, and then Edit the encrypted file.
- Create a playbook that writes an encrypted message to a file on all nodes.
- Execute particular play based on tags.
In addition to the exam curriculum and the Ansible documentation, I used several other resources throughout my exam journey. They repeat each other Almost always, therefore studying all of them is not required to succeed; this includes:
- Video course by LinuxAcademy:
- Practice exam by LinuxAcademy:
- “Ansible for DevOps” by Jeff Geerling:
- Sample exam on lisenet.com:
It does not matter whether you are a SysAdmin, a DevOps engineer, or a Developer – Ansible is an exceptional tool that can solve numerous problems and help you get over a variety of obstacles. The Red Hat Certified Specialist in Ansible Automation is a significant addition to your resume. I wish you good luck during the exam. If you have any comments or suggestions, please feel free to contact me directly.