
Explore fundamental and advanced Ansible concepts. Learn to automate tasks, manage configurations, and orchestrate deployments through hands-on exercises in real-world DevOps workflows.
Discover what Ansible is, its quick history, and why it is a go-to automation tool with key features, how it works, and popular use cases.
Explore how Ansible automates infrastructure tasks with YAML and SSH to manage configurations on remote servers across on premises and cloud environments.
Explore why Ansible stands out in information technology automation with agentless ssh, yaml syntax, and broad os support for configuration, provisioning, deployment, and orchestration.
Explore practical use cases of Ansible across servers, networks, storage, cloud provisioning, and applications. Use playbooks to automate configuration, security, RBAC, database and CI/CD tasks with consistent results.
Explore configuration management, infrastructure as code, and idempotency while comparing imperative and declarative approaches to understand how Ansible works.
Learn how an agentless Ansible controller manages remote nodes via ssh, using yaml playbooks, modules, and inventory for automated configurations.
Explore essential Ansible terminologies, including inventory, hosts, modules, playbooks, roles, and collections, and learn how ad hoc commands, yaml playbooks, vault, and Galaxy power automation.
Explore Ansible packages and releases, comparing Ansible core and the full Ansible package, their module sets, versioning cadence, and installation choices for Ubuntu.
Explore the official Ansible documentation, navigate sections for getting started, installation, and modules, and learn how to locate collections and plugins for practical automation.
Explore what Ansible is, its use cases, and why it is a preferred automation tool, including architecture, playbooks, configuration management, infrastructure as code, idempotency, and imperative vs declarative approaches.
Install and configure Ansible to enable automated infrastructure management. Learn setup steps, SSH key prep, installation, and verification through practical demonstrations.
Learn to set up an Ansible controller with passwordless SSH to managed nodes, install and validate Ansible on Linux or Windows hosts, using Python prerequisites and minimal hardware.
Introduce a three-node environment for an Ansible hands-on lab, featuring a controller and two Ubuntu nodes on AWS EC2, configured with key-pair logins and cloud or vagrant provisioning.
Prepare the controller node for Ansible by setting the hostname, updating /etc/hosts for hostname to IP resolution, and verifying Python, then enable passwordless SSH to managed nodes.
Enable passwordless authentication between the controller and managed nodes using ssh, keygen, and scp. Generate keys, copy them, set permissions, and append authorized_keys to prepare for Ansible installation.
Install Ansible on the controller node by updating package repositories, adding the PPA, installing Ansible, and verifying with ansible --version showing 2.16.6.
Validate the Ansible installation by running ad hoc commands on the controller node, retrieving operating system details and setting hostnames for the managed nodes in the inventory file.
Demonstrate running Ansible on the controller by treating localhost as a managed host. Configure a local connection with Ansible_connection=local and test with ping to learn on a single server.
Prepare a controller node for Ansible installation and set up ssh keys for passwordless communication between nodes. Install and validate Ansible with ad hoc commands.
Explore Ansible inventory fundamentals, including inventory types, file formats, and hosts with groups. Learn to use custom inventories, organize directories, and apply variables via the inventory command line.
Learn how Ansible inventories organize managed nodes into files and groups, enabling pattern-based targeting and scalable task execution across multiple hosts using the default inventory at /etc/ansible/hosts.
Learn how Ansible handles static and dynamic inventories, using ini or yaml formatting for static host lists grouped by function, and scripted dynamic inventories that adapt to cloud environments.
Explore inventory file formats for static inventories, focusing on ini and yaml. Compare ini's simplicity with yaml's structured hierarchy, including two-space indentation and colon syntax.
Group multiple hosts in an inventory file using square-bracket headings and default all and ungrouped groups for universal targeting, with ini and YAML range examples across roles and environments.
Learn how to manage multiple hosts using inventory files, organize them into groups with square-bracket headings, understand all and ungrouped groups, and define host ranges in ini or YAML inventories.
Demonstrates editing the default Ansible inventory file and creating a thickness_servers group for manage nodes. Validates connectivity with a ping test and a sample playbook run against the inventory.
Demonstrates the ansible-inventory command line tool to display or dump the inventory as Ansible sees it, with list and graph options and support for ini, yaml, and json formats.
Learn how Ansible inventory variables customize configurations per host or group using inline host declarations and group var files. Grasp key value syntax and Python literal structures.
Demonstrate assigning ansible_host and http_port to each host in an inventory using inline variables and a var section. Validate variables with ad hoc debug commands.
Explore inventory files in Ansible, including static and dynamic inventories, ini and yaml formats, groups, multiple sources, and inventory variables, with a practical demonstration. Prepare to explore playbooks.
Explore Ansible modules, plugins, and ad hoc commands; learn how modules automate tasks across systems, differentiate core and custom modules, and see practical demonstrations of modules and ad hoc commands.
Explore Ansible modules as small, reusable building blocks that automate tasks on managed nodes in playbooks, including core and community modules, collections, and ad hoc commands.
Discover Ansible core modules, maintained by the core team and included by default in the built-in collection, with a hands-on Apache install on multiple nodes using the built-in package module.
Learn to create custom modules that extend Ansible beyond core modules and Ansible Galaxy, using Python or other languages locally, then add them for execution.
Explore how Ansible plugins extend Ansible core functionality on the controller node, including callback, lookup, inventory, and filter plugins, with Python development and collections for sharing features.
Explore the official Ansible documentation, navigate the modules and plugins index, learn about the built-in package module, its synopsis, parameters, and examples, and practice using ansible-doc with grep.
Explore Ansible ad hoc commands as a direct, immediate way to execute tasks on managed nodes, from checking kernel versions to starting or stopping services, installing packages, and managing files.
Learn the syntax of Ansible ad hoc commands, with examples that show targeting hosts, using modules like ansible.builtin.ping and ansible.builtin.shell, and passing arguments with -a and -L for multiple hosts.
Learn to craft ansible ad hoc commands with host patterns, -m modules, and -a attributes to run ping and file on targets, and inspect module documentation.
Explore ad hoc commands in Ansible through ten examples, using the built-in command module, file, user, group, fetch, copy, shell, and apt modules to manage users, files, packages, and services.
Explore modules and plugins as building blocks of automation in Ansible, learn to use ad hoc commands and a playbook, and discover how to develop custom modules for targeted tasks.
Explore the use case and advantages of Ansible playbooks for repeatable tasks, learn their structure and components, and practice developing, validating, and running multitask playbooks through hands-on demonstrations.
Explore how Ansible playbooks automate tasks across hosts using plays, tasks, inventory, and modules in YAML, highlighting the declarative approach, repeatability, modularity, and version control benefits.
Explore YAML fundamentals for DevOps configuration, compare YAML with XML and JSON, and learn dictionaries, lists, indentation rules, and how to validate YAML with common tools.
Discover the three-part structure of an Ansible playbook—generic, tasks, and optional handlers—written in yaml, with hosts, variables, and connection settings. Understand top-to-bottom execution, modules in tasks, and the notify-driven handlers.
Learn a four-step workflow to create and run Ansible playbooks, including YAML basics and roles, writing, syntax checks, smoke testing, and finally executing the playbook in a live environment.
Learn how to run Ansible playbooks using the playbook command line utility, including syntax and options, checking syntax, listing targeted hosts, and simulating runs in check mode.
Demonstrate developing an Ansible playbook by defining hosts, become, and tasks with the file module to create a file at a path with mode, and verify syntax.
Learn to create and run Ansible playbooks through a four-step workflow—create, syntax check, smoke test, and run—using YAML, VI editor, and built-in modules for user creation and Apache installation.
Create an Ansible playbook to install Docker on Ubuntu, including prerequisites ca-certificates and curl, adding Docker's GPG key and repository, and installing Docker CE with service started and idempotent tasks.
Demonstrates writing a multi-task Ansible playbook to install, start, and enable MySQL on a target node using apt and systemd modules.
Explore Ansible playbooks by introducing YAML, outlining their structure, and using the runner to execute them, with practice creating varied playbooks, checking syntax, and performing a smoke test.
Explore using Ansible to configure and manage Windows servers by setting up inventory, using Windows modules, and applying playbook concepts for Windows tasks.
Learn to configure Windows as a target node for Ansible by installing prerequisites, adding to inventory, and validating connectivity with win_ping before running Windows playbooks.
Add a Windows server as a managed node in Ansible by provisioning the instance, creating an admin user, enabling WinRM, and updating the inventory.
Demonstrates running ad hoc tasks on Windows with Ansible, using win_command, win_file, and win_copy to create files and directories, verify hostname and netstat, and handle path escaping.
Demonstrates creating a new local Windows user with an Ansible win_user module in a playbook, including password, password_expired, and update_password_create settings, and verification on the Windows server.
Configure Windows servers as Ansible targets, verify connectivity with the win_ping module, run ad hoc commands, and create playbooks tailored for Windows environments to manage Windows infrastructure efficiently.
Explore Ansible variables, their types, and how to define and reference them in playbooks, with demonstrations on creating variables and using built-in Ansible facts.
Learn how Ansible variables act as placeholders to store values for playbooks, roles, and templates, enabling dynamic configurations across environments using inventory, playbook variables, facts, role variables, and global variables.
Define and use ansible variables in playbooks with the var keyword and YAML key value syntax. Learn naming rules, nested variables, and how to reference them with Jinja2 in playbooks.
Learn to use variables in Ansible playbooks by converting a user creation example to a variable-driven version, declare vars in the play, and apply them to two users.
Explore magic variables in Ansible to access dynamic information about operations, including the Ansible version, Python interpreter path, inventory hosts and groups, and playbook directories.
Learn how Ansible facts gather data from a target host with the built-in setup module, exposing kernel, network, and disk details as JSON variables for use in playbooks.
demonstrates gathering Ansible facts with the built-in setup module, using ad hoc commands and playbooks to access hostname, IP address, and date time via dot or bracket notation.
Demonstrates disabling facts in an Ansible playbook by setting gather_facts: no to conserve bandwidth and boost performance on inventories, with no_facts.yml showing a file created on managed node without facts.
Discover how to define, use, and register variables across inventory, playbook, role, and global scopes, including include underscore vars, magic variables, and Ansible facts.
Explore conditionals, loops, and handlers in Ansible playbooks to create dynamic, efficient automation workflows, with practical demonstrations of example playbooks using these concepts.
Master conditionals in Ansible using when statements and logical operators to control task execution. Apply Ansible facts like distribution and distribution_version to install apache2 on Ubuntu 22.04 and above.
Learn how to use loops in Ansible to iterate over items and apply tasks to each item, demonstrated by creating four users on a single managed node zero two.
Demonstrate installing Docker on a target node with an Ansible playbook using loops and conditionals, including prerequisites, the Docker GPG key, repository, and an Ubuntu 22+ install condition.
Learn how Ansible handles notify-driven actions to restart services only when needed, with a practical example of apt installs and copying apache2.conf, using the restart Apache handler.
Demonstrates an Ansible playbook that combines conditionals, loops and handlers to install apache2 and php 8.3-fpm on Ubuntu 22 or newer, triggering service restarts via a notify-driven handler.
Explore Ansible playbooks with conditionals, including the when statement, loops, and handlers to control execution flow, install Docker on Ubuntu 22+ hosts, manage users, and restart services after changes.
Explore Ansible roles, their benefits, and the standard directory structure, then create and use roles with a hands-on demonstration, including dependencies, defaults, and diverse use cases.
Organize and reuse Ansible playbooks by creating roles that group tasks, files, variables, and templates into a modular, readable structure for multi-cloud deployments across AWS, Azure, and Google Cloud Platform.
Explore the directory structure of ansible roles, learn about the seven to eight directories, key folders like tasks, handlers, templates, files, vars, defaults, meta, and tests, plus readme and main.yml.
Create and organize Ansible roles with a standard directory structure using Ansible Galaxy. Compare static import_role and dynamic include_role, and use import_tasks for OS-specific task files and managing dependencies.
Create and use Ansible roles by initializing server roles, organizing templates, files, defaults, handlers, vars, and tasks, then apply the role in a playbook to manage a user.
Explore automation with Ansible using include_role and import_role in playbooks to load roles dynamically or statically, with conditionals and loops, validated by examples.
Discover how role dependencies work in Ansible, declare prerequisites in the main role, and see how Ansible loads and runs dependent roles before the current one.
Shows how to create a dependent Ansible role by adding web roles as a dependency to server roles, configuring the web username web admin and using the user module.
Discover how role defaults offer lower priority than var main.yml and defaults/main.yml, convert a fixed mode to a variable, and override it with vars.
Explore Ansible roles, their structure, creation, and reuse to organize and build complex automation workflows, including dependency management and role variables and defaults.
What’s in this course?
This Automation with Ansible course, designed for absolute beginners, introduces the basic fundamental blocks needed to get started with Ansible. The course begins with an introduction to Ansible and Ansible's key terminologies followed by real time Ansible setup, In-depth Architecture, Ansible Modules. This course also covers some of the core critical concepts such as Playbooks, Roles, Collections, important Ansible configuration files, Facts, Ansible Vault, Jinja Templates, Ansible for Windows, Troubleshooting scenarios and much more. Don’t worry if you are new to Ansible, we are going to get started with the absolute basics. Each lecture in this course is accompanied by real hands-on demos.
This course also covers Ansible AWX an upstream project of Red hat Automation Platform (previously known as Ansible tower).
What is Ansible?
In today's complex IT landscape, managing numerous servers and ensuring consistent configurations across them can be a daunting task. This is where Ansible steps in, offering a powerful open-source platform to simplify and automate infrastructure management including the provisioning, patching, configuration, and management of operating systems and application components across enterprise data centers, cloud environments or Virtual infrastructures like VMware.
Course Structure:
Lectures
Demos
Quizzes
Assignments
Course Contents:
Introduction to Ansible
Understanding Ansible Framework and Terminologies
Setting up Ansible Environment
Ansible Indepth Architecture
Inventory types and Management
Modules - The Basic Building Blocks
Adhoc Tasks
Ansible Code Creation Process (Playbooks)
Ansible for automating Windows tasks
Variables, Magic Variables and Facts
Conditionals and Loops
Handlers System
Ansible Roles and Collections for Bigger Environments
Ansible Galaxy for pre-built Roles and Collections
Ansible Vault
Troubleshooting Tips
Ansible AWS - a web based UI
All sections in this course are demonstrated Live. The intention for enrolled users is to setup their own Ansible environment, perform the exercises and learn by doing!