Free Online Course · Self-paced · Hands-on

Ansible Tutorial for Beginners [RHCE EX294 Exam]

Free Ansible tutorial and Red Hat RHCE EX294 exam prep with hands-on labs on Rocky Linux 10: playbooks, roles, Vault, and RHCSA tasks automated end to end.

  • 12 chapters
  • 49 lessons
  • ~25h
  • Beginner to Intermediate
  • Tested with Rocky Linux 10.2
  • Updated Sep 2026
Ansible Tutorial for Beginners [RHCE EX294 Exam]
By Last updated

About this course

This free course takes you from your first inventory file to the level Red Hat expects on the EX294 exam, which Red Hat now lists as Red Hat Certified Advanced System Administrator in Ansible. The chapters follow the current EX294 study points: configuring Ansible and managed nodes, running playbooks with both ansible-playbook and ansible-navigator, roles and Content Collections, Vault, and automating the RHCSA tasks the exam is built around.

EX294 is a hands-on exam graded against freshly installed systems, so reading about modules is not enough. Every lesson runs on the same two-node Rocky Linux 10.2 lab, one control node and one managed node, with ansible-core 2.16 from AppStream and ansible-navigator running its execution environment in Podman. That matches the toolset the exam objectives name, and it costs nothing beyond two small VMs.

If you are new to Ansible, start with the practice lab setup and work through the chapters in order, because later lessons reuse that inventory and the ansible user. If you already write playbooks, go straight to Rocky Linux Administration for the exam-style tasks, or to Roles and Collections and Troubleshooting.

What you'll learn

  • Build a two-node Rocky Linux 10 lab and install ansible-core and ansible-navigator on the control node
  • Write inventories with group_vars and host_vars, and run ad hoc commands against managed nodes
  • Write idempotent playbooks and run them with both ansible-playbook and ansible-navigator
  • Use variables, facts, registered results, and Jinja2 templates to generate configuration files and reports
  • Control task flow with conditionals, loops, handlers, tags, and block, rescue, and always
  • Automate RHCSA tasks with Ansible, including packages, users, services, cron, LVM, firewalld, and SELinux
  • Build roles, install Galaxy roles and collections, and apply RHEL System Roles
  • Protect secrets with Ansible Vault and debug failing playbooks from their error output

Who this course is for

  • Linux sysadmins who want to automate the RHCSA-level work they already do by hand on RHEL and Rocky Linux
  • Candidates preparing for Red Hat's EX294 exam who need a multi-node practice lab and a syllabus that tracks the objectives
  • DevOps engineers and SREs who inherit playbooks and need to read, debug, and extend them without breaking production hosts

Prerequisites

  • Linux administration at roughly RHCSA level, including users, packages, services, storage, and SELinux on a RHEL-family system
  • Two Rocky Linux 10 or RHEL 10 VMs on the same network with 2 GB RAM each and outbound internet on the control node
  • Basic YAML reading helps, and the Playbook Basics chapter covers the syntax Ansible uses
  • An AWS account only for the final provisioning lesson. The rest of the course needs no cloud account

Exam objectives covered

Red Hat Certified Advanced System Administrator in Ansible (EX294) blueprint — 11 domains · official objectives

  1. Be able to perform all tasks expected of a Red Hat Certified System Administrator

    • Understand and use essential tools
    • Operate running systems
    • Configure local storage
    • Create and configure file systems
    • Deploy, configure, and maintain systems
    • Manage users and groups
    • Manage security
    • Be able to analyze simple shell scripts
  2. Understand core components of Ansible

    • Inventories, modules, variables, facts, loops, and conditional tasks
    • Plays, playbooks, configuration files, and roles
    • Handling task failure
    • Use provided documentation to look up specific information about Ansible modules and commands
  3. Configure Ansible

    • Create and modify ansible.cfg
    • Modify ansible-navigator.yml
    • Create a static host inventory file
    • Create and use static inventories to define groups of hosts
  4. Configure Ansible managed nodes

    • Create and distribute SSH keys to managed nodes
    • Configure privilege escalation on managed nodes
    • Deploy files to managed nodes
  5. Run playbooks

    • Know how to run playbooks with ansible-navigator and ansible-playbook
    • Use ansible-navigator to find new modules in available Ansible Content Collections and use them
    • Use ansible-navigator to create inventories and configure the Ansible environment
  6. Perform basic source control operations using Git

    • Clone a Git repository
    • Add files to a Git repository
  7. Be familiar with Visual Studio Code (VS Code)

    • Create playbooks and push them to a Git repository
    • Configure ansible-navigator
    • Run playbooks using an Ansible development container
  8. Create Ansible plays and playbooks

    • Know how to work with commonly used Ansible modules
    • Use variables to retrieve the results of running a command
    • Use conditionals to control play execution
    • Configure error handling
    • Create playbooks to configure systems to a specified state
  9. Use roles and Ansible Content Collections

    • Create and work with roles
    • Install roles and use them in playbooks
    • Install Content Collections and use them in playbooks
    • Obtain a set of related roles, supplementary modules, and other content from content collections, and use them in a playbook
  10. Automate standard RHCSA tasks using Ansible modules

    • Software packages and repositories, services, and firewall rules
    • File systems, storage devices, file content, and archiving
    • Task scheduling, security, and users and groups
  11. Manage content

    • Create and use templates to create customized configuration files
    • Use Ansible Vault in playbooks to protect sensitive data

Versions and testing environment

Every command in this course was run on this stack

ComponentVersionNotes
Rocky Linux 10.2 Control node and managed nodes. RHEL 10 and AlmaLinux 10 follow the same steps
ansible-core 2.16.x Installed with dnf from the Rocky Linux 10 AppStream repository
ansible-navigator and ansible-lint 26.6.x Installed from PyPI for the navigator and VS Code lessons, with Podman 5.8.2 running the execution environment
AWS provisioning lesson ansible-core 2.20.x, amazon.aws 11.4.x Only the final chapter, run from an Ubuntu 26.04 LTS control node

Syllabus

12 chapters · 49 lessons · ~25h of reading

  1. 1 Getting Started 2 lessons · ~33 min
    1. Part 1 RHCE EX294 exam objectives and study plan 11 min read
    2. Part 2 What is Ansible? Architecture and components 22 min read
  2. 2 Installation and Lab Setup 5 lessons · ~1h 2m
    1. Part 3 EX294 practice lab setup on Rocky Linux 10 10 min read
    2. Part 4 Installing Ansible on the control node 14 min read
    3. Part 5 Ansible configuration file (ansible.cfg) 11 min read
    4. Part 6 Ansible project directory structure 11 min read
    5. Part 7 ansible-navigator.yml settings 16 min read
  3. 3 Inventory and Connectivity 6 lessons · ~1h 16m
    1. Part 8 Ansible inventory files 14 min read
    2. Part 9 group_vars, host_vars and inventory patterns 13 min read
    3. Part 10 Using Ansible ad-hoc commands 15 min read
    4. Part 11 Modules, ansible-doc and collections 12 min read
    5. Part 12 command vs shell vs raw modules 18 min read
    6. Part 13 Connect with --ask-pass (password auth) 4 min read
  4. 4 Playbook Basics 6 lessons · ~1h 10m
    1. Part 14 YAML syntax used in Ansible playbooks 10 min read
    2. Part 15 Ansible playbook structure (plays, tasks, modules) 11 min read
    3. Part 16 Write your first Ansible playbook 10 min read
    4. Part 17 Run playbooks with ansible-playbook and navigator 14 min read
    5. Part 18 Ansible idempotency explained 11 min read
    6. Part 19 Git and VS Code workflow for Ansible projects 14 min read
  5. 5 Variables, Facts and Data 4 lessons · ~42 min
    1. Part 20 Ansible variables explained 10 min read
    2. Part 21 Ansible variable precedence 11 min read
    3. Part 22 Ansible facts and custom facts 10 min read
    4. Part 23 Register and magic variables 11 min read
  6. 6 Files, Templates and Reports 4 lessons · ~57 min
    1. Part 24 Template module and Jinja2 14 min read
    2. Part 25 lineinfile vs blockinfile vs replace vs template 14 min read
    3. Part 26 file, copy and fetch modules 16 min read
    4. Part 27 Generate hosts files, archives and reports 13 min read
  7. 7 Logic and Control Flow 7 lessons · ~1h 37m
    1. Part 28 Operators and Jinja2 tests in when 12 min read
    2. Part 29 Ansible when conditionals (facts and variables) 11 min read
    3. Part 30 Repeating tasks with Ansible loop 15 min read
    4. Part 31 Ansible handlers (notify pattern) 17 min read
    5. Part 32 Ansible tags explained 13 min read
    6. Part 33 include_tasks vs import_tasks 12 min read
    7. Part 34 Block / rescue / always (error recovery) 17 min read
  8. 8 Rocky Linux Administration (EX294) 6 lessons · ~1h 25m
    1. Part 35 Manage packages and repositories on Rocky Linux 10 14 min read
    2. Part 36 Manage users, groups, SSH keys and sudo 13 min read
    3. Part 37 Manage services, cron and at jobs on Rocky Linux 10 17 min read
    4. Part 38 Manage LVM, filesystems and mounts on Rocky Linux 10 14 min read
    5. Part 39 Manage firewalld and SELinux on Rocky Linux 10 14 min read
    6. Part 40 SELinux file contexts with Ansible 13 min read
  9. 9 Roles and Collections 3 lessons · ~36 min
    1. Part 41 Ansible roles directory structure 13 min read
    2. Part 42 Create and install Galaxy roles 12 min read
    3. Part 43 Collections and RHEL System Roles 11 min read
  10. 10 Ansible Vault 2 lessons · ~18 min
    1. Part 44 Ansible Vault — encrypting secrets 11 min read
    2. Part 45 Vault with group_vars and host_vars 7 min read
  11. 11 Troubleshooting 3 lessons · ~46 min
    1. Part 46 Ansible troubleshooting guide 17 min read
    2. Part 47 Debug Ansible playbooks 13 min read
    3. Part 48 Collection, module and variable errors 16 min read
  12. 12 Real-World Automation 1 lesson · ~14 min
    1. Part 49 Provision AWS infrastructure with Ansible 14 min read

Hands-on labs

6 guided builds you run yourself

  1. Build a two-node EX294 practice lab

    Set up a control node and a managed node on Rocky Linux 10 with real hostnames, an ansible user, SSH keys, and passwordless sudo.

  2. Generate /etc/hosts and system reports from facts

    Render /etc/hosts from inventory and facts with a Jinja2 template, archive files, and fetch a per-host report back to the control node.

  3. Provision LVM storage with persistent mounts

    Create a partition, volume group, and logical volume, format it with XFS, mount it through /etc/fstab, and extend it later.

  4. Build a role and install roles from Galaxy

    Scaffold a custom role with ansible-galaxy init, use it in a playbook, and pin third-party roles in requirements.yml.

  5. Keep secrets in Vault-encrypted group_vars

    Lay out plain and encrypted variables side by side, use vault IDs per environment, and keep secrets out of Git and playbook output.

  6. Launch and tag an EC2 instance with Ansible

    Install the amazon.aws collection, create a security group, launch an instance, find it by tag, and terminate it when you finish.

Where to go after this course

  • Book the EX294 examCheck the current objectives and exam version on Red Hat's page before you schedule.
  • RHCSA Cheat SheetEX294 assumes every RHCSA task, so revise the manual commands your playbooks replace.
  • Git courseEX294 now expects you to clone and push playbooks with Git, and this course covers the rest of the workflow.
  • Terraform Associate courseProvision the infrastructure with Terraform, then hand configuration over to Ansible.

Frequently Asked Questions

Is EX294 still the RHCE exam?

Yes, the exam code is the same. Red Hat's exam page now calls EX294 the Red Hat Certified Advanced System Administrator in Ansible exam, and says that passing it counts toward Red Hat Certified Engineer in Ansible and Red Hat Certified Architect in Ansible. Most people still search for "RHCE EX294", and both names refer to this exam. Confirm the current credential path on the official EX294 page.

What is the EX294 exam format?

It is a practical exam, not multiple choice. You get several systems and a list of tasks described as end states, and you write playbooks that bring those systems into that state. Red Hat grades the exam by running your playbooks against freshly installed systems. You get no internet access and cannot bring notes, although the documentation that ships with the product is usually available. Configuration must survive a reboot, and scores usually arrive within three U.S. business days. Red Hat changes exam details between versions, so check the exam page before you book.

Do I need to know RHCSA material before starting?

For the exam, yes. Red Hat lists RH124 and RH134 (or RH199), or comparable RHEL administration experience, as the preparation for EX294, and tells candidates to review the EX200 objectives. Many EX294 tasks are RHCSA jobs done through modules instead of commands. If storage, SELinux, or firewalld are still shaky, work through the RHCSA course alongside this one.

How long does the certification stay current?

Red Hat certifications stay current for three years from the date you earn them. You can renew by retaking the same exam or by passing a higher-level Red Hat exam, which also renews the lower-level certifications under it. The Red Hat certification renewal page lists the current options.

Why does the course use ansible-core 2.16 when upstream is on 2.21?

Rocky Linux 10 and RHEL 10 ship ansible-core 2.16 in AppStream, and the lab uses the version the operating system gives you rather than the newest PyPI release. Upstream ansible-core reached 2.21.4 in September 2026, and the community ansible package 13 is built on 2.20. The playbook syntax and modules in this course behave the same on those releases. Install one version with one method (dnf, pipx, or pip) and stay with it, because mixing them gives confusing ansible --version output.

Can I practice on Rocky Linux instead of RHEL?

Yes. Every lesson here was run on Rocky Linux 10.2, which is built to be compatible with RHEL 10, and AlmaLinux 10 works the same way. The modules, file paths, and SELinux behaviour you automate are the same. If you want the exact RHEL experience, Red Hat's no-cost Developer Subscription for Individuals gives you RHEL for a home lab.

Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with 15+ years of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, networking, and security, delivering robust and efficient solutions for diverse projects.

  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security
  • Cloud Computing
  • Kubernetes
  • Linux
  • Ansible (software)