Ansible Exercises

Apply and reinforce Ansible knowledge through a series of hands-on exercises. This collection of practical challenges is designed to test and improve skills in automation and configuration management. Each exercise presents a real-world problem, requiring the application of Ansible concepts, from writing basic playbooks to managing dynamic inventories and complex roles. This practical approach ensures a deeper understanding of Ansible's capabilities in production environments.

Ansible Cron Module

Ansible Cron Module

Welcome to the Ansible Cron Module Lab! In this lab, you will learn how to automate the scheduling of tasks using the Ansible Cron module. The lab consists of several steps, each building upon the previous one to gradually increase the complexity of managing cron jobs with Ansible. By the end of this lab, you will have a solid understanding of how to use the Ansible Cron module for scheduling tasks.
LabAnsible
Install Ansible on Red Hat Enterprise Linux

Install Ansible on Red Hat Enterprise Linux

In this lab, you will learn to install Ansible Core on a Red Hat Enterprise Linux (RHEL) system using the dnf package manager, verify the installation, and start using Ansible for automation tasks.
LabAnsible
Implement an Ansible Playbook on RHEL

Implement an Ansible Playbook on RHEL

In this lab, you will implement a complete Ansible playbook to deploy an Apache web server on a RHEL system. You will create an inventory file, configure the Ansible environment, write a multi-task playbook to install Apache, deploy a web page, configure the firewall, and test the deployment.
LabAnsible
Installation and Inventory

Installation and Inventory

In this lab, you will learn how to install Ansible on Ubuntu, generate SSH keys for authentication, and configure your first static inventory file to manage the localhost.
LabAnsible
Organizing with Roles

Organizing with Roles

In this lab, you will learn how to scale up your Ansible automation by refactoring playbooks into structured Roles. You will initialize a role using Ansible Galaxy, define tasks within the role, and reference it in a master playbook.
LabAnsible
Variables and Templates

Variables and Templates

In this lab, you will learn how to use Ansible variables and Jinja2 templates to create dynamic configuration files and deploy them to a web server.
LabAnsible