
Learn how Ansible connects on your behalf to your services and maintains servers in the desired state you specify.
The lecture explains the Ansible architecture by showing a control machine managing target hosts, with Python required on targets and support for Linux and Windows, including Windows Subsystem for Linux.
Set up the lab environment by provisioning a control machine and a target host, generate an ssh key pair, verify key-based login, and prepare the inventory file.
Create a hands-on Ansible lab by provisioning a target host (cloud, local, or container), setting up SSH keys and inventory, then install Ansible with pip and verify with ping module.
Learn how to set the Ansible inventory permanently in the ansible.cfg configuration file by adding an inventory path under the defaults section.
Add a second target host to the inventory by defining a container with localhost, the same private key and remote user, and port 25, then ping it to verify.
Master Ansible by using modules as the primary materials, explore modules with ad hoc commands, and apply file and service modules in both ad hoc tasks and playbooks.
Learn how to use the ansible copy module to transfer a file from the control machine to target hosts, specifying source and destination and validating the result.
Explain the idempotent module in Ansible by comparing the desired state to the actual state on the target server and doing nothing if already matched.
Copy a file to the target host using the copy module. Add a new line to that file with the lineinfile module by specifying the path and the line content.
Use Ansible's package module to install an OS package such as nginx for a web server, specifying state present. Run with become to obtain sudo privileges.
Grant sudo access to a remote user by configuring sudoers on the target host and enabling become on the control machine, then verify engine X is running on port 80.
Explain how ad hoc commands differ from playbooks for quick tests. Migrate to a playbook by defining a module and its attributes in a key-value text file to preserve history.
Learn YAML basics: key-value pairs, nested objects, lists with dashes, multi-line strings, and comments, and understand how YAML converts to JSON for Ansible playbooks.
Discover how an Ansible playbook uses a yaml text file to list plays and tasks for specific hosts, with modules like file and copy.
Write and run your first Ansible playbook to copy two files and archive them into a zip, targeting the inventory's hosts and using copy and archive modules.
Learn to assign names to each play and to individual tasks in an Ansible playbook, use the name key as documentation, and apply consistent naming across all plays and tasks.
Install and start the web server with an Ansible playbook, then deploy the static site from GitHub by placing index.html in the web root, creating the directory if needed.
Apply the best practice of not repeating yourself by using variables in playbooks. Learn how defining variables, the variable set syntax, and refactoring to use variable names streamline your playbooks.
Learn how to validate Ansible variable names by following rules: start with a letter and include only letters, numbers, or underscores, avoiding dashes and leading digits.
Assign playbook variables from the command line, the play, or inventory, with command line values highest; use external vars and the play’s vars, plus predefined and custom inventory variables.
Use the debug module to print the web_server variable and note that a command-line variable overrides it due to higher precedence.
Explore host scope in Ansible by defining a host-specific variable in the inventory, such as web_server = tomcat, and see how playbook precedence affects its value.
Learn how to switch from embedded to play-scoped variables by externalizing them into a vars file, importing the file, and running the playbook successfully.
Demonstrates deploying a new website version via a single Ansible command in a CI/CD pipeline by passing a branch variable, creating a v2 branch, and updating the index.
Execute the same command using the previous branch to trigger a rollback, verify the website, and ensure the pipeline can revert smoothly.
Explore how registered variables capture task outputs at runtime in Ansible, using the register keyword to store results for use in a playbook.
Register variables in an Ansible playbook, print them with the debug module, and copy the content to a remote file for use by subsequent tasks.
Use the setup module to gather Ansible facts at the start of a playbook, revealing hostname, fqdn, kernel, OS distribution, and partition sizes, and disable with gather_facts: no.
Explore runtime variables with ansible_facts by using the debug module to print and inspect facts about the remote host, including hostname, distribution, and fqdn.
Turn off the gather facts feature to control runtime variables in an Ansible playbook by adjusting play attributes.
Explore runtime magic variables in Ansible, such as inventory_hostname, hostvars, and group_names, provided by Ansible rather than set by you. We will dive deeper into inventory in the next section.
Expand the ansible inventory to simulate a real-world setup with multiple servers across dev and production environments. Create OS users and grant them access to the servers.
Add more target hosts to the Ansible inventory by defining each server's IPs, SSH user, and private key, then test connectivity with the ping module.
Define a group in the inventory by listing hosts under the group name, then target the group to manage multiple production servers at once.
Target a group inside a playbook using the hosts key and inventory group, then install the engineers package with the package module using become, and verify on all hosts.
Move common variables from individual hosts to the group level so shared user, port, and private key apply to all hosts in that group.
Move variables from play scope to host or group in an Ansible playbook to deploy version 1 on development servers and version 2 on production, across multiple hosts.
Explore Ansible's magic variables by writing a playbook that prints inventory hostname, host vars, group vars, and magic variables using the debug module, targeting all defined groups.
Use the ansible-inventory CLI to list a host’s variables and view the inventory format, gaining quick visibility into host data within your Ansible setup.
Learn inventory best practices in Ansible: inline host vars, host_vars and group_vars directories, per-host and per-group files, and secure encryption considerations.
Move inventory variables into host_vars and group_vars folders to centralize per-host and per-group data, create files, migrate values with colon syntax, and verify by re-reading the inventory.
Learn to iterate with an Ansible loop and item variable to deploy multiple pages (index, about) for a static site, using the same module and refactoring for efficiency.
Use Ansible's when keyword to control task execution by variables and branches, deploying the login page and index file on dev while skipping on production.
Learn how to delegate a task to another host in Ansible using the delegate_to attribute. See how a file is created on the local host instead of the target host.
Discover how to migrate long task lists into separate files using Ansible's import_tasks module. Import external task files into your playbooks to streamline deployment tasks.
Understand how to use Ansible handlers and the notify mechanism to trigger downstream tasks only on change by moving changed tasks to handlers.
Explore Jinja2 in relation to Ansible, mastering variable injection with double curly braces, and using the item variable in for loops within templates.
Learn how to use filters as transformers with the pipe syntax to modify variables, including capitalize, password hash, length, sum, and max, in Ansible-style playbooks.
Learn to choose between the copy module and the template module in Ansible, using copy for static files and template for template files, following the files and templates directory conventions.
Explore Jinja2 if-else blocks to render templates based on conditions, print messages according to memory size, and copy templates via an Ansible playbook to a target host.
Learn jinja2 for loops in templates to iterate over lists and objects, print each element, and apply filters such as capitalize to format names in ansible playbooks.
Learn how to secure passwords with Ansible Vault by configuring a master key file and vault password, then encrypt and decrypt files; avoid editing encrypted content in your editor.
Master Ansible vault hands-on by creating an encrypted variable file with user data, decrypting it in a playbook, and using it to securely create users with passwords.
Discover why configuration management is software, how to reuse tasks via import tasks module, and build a standalone bundle with variables, handlers, files, and templates for team and community sharing.
Explore the anatomy of an Ansible role, including the tasks core, the main entry point, and supporting directories such as defaults, files, templates, handlers, meta, and vars.
Learn to use the Ansible Galaxy CLI to manage roles: install from a requirements file, install individual roles. Create roles from a skeleton and explore Galaxy commands for guidance.
Import roles into an ansible project by configuring roles paths and defaults, installing downloaded roles with ansible galaxy, and using import_role or play-level role keywords.
Configure an Ansible project, fetch Jenkins and Java roles from Galaxy, and run a playbook to install Jenkins, then access the Jenkins UI with default admin credentials.
Install Kubernetes in minutes using an Ansible role, by setting up a three-node inventory, distinguishing master and worker hosts, and ensuring Docker, CNI, and dependencies are installed via Ansible Galaxy.
Become an Ansible Expert is the one of the most requested DevOps skills!
Whether you have never learn about Ansible, or want to learn about the advanced features of Ansible, this course is for you !!
Whether you want to get theories of Ansible only, or love Hands-on & getting your hands dirty, this course is for you as well !!
With 100 lectures of video comprehensive , the course includes also :
- assignments
- quizzes
- and Capstone Project.
In this course you will learn everything you need to become an Ansible Pro! Including:
How to prepare a Lab Environment to play with Ansible
Ansible Modules - from scratch
Ansible Adhoc command
Ansible Playbooks
Ansible Variables - Global Scope
Ansible Variables - Play Scope
Ansible Variable - Host Scope
Ansible Inventory - Expanding the inventory
Ansible Task Control ( if-else, for loop,..)
Jinja2 Templates
Ansible Vault [ Not Hashicorp Vault :) ]
Ansible Roles
Install Jenkins with Ansible
Install Docker Engine with Ansible
Install a Kubernetes Cluster with Ansible
Ansible Collections
More Advanced Topics, Hints and Best practices ( Dynamic Inventory,... etc)
Capstone Project (with Go Lang, React Js and MongoDB)
CAPSTONE PROJECT------
In the Capstone Project section, we will configure/deploy step by step a three tier Application ( React, Go, MongoDB) using Ansible.
In this project, you will get your hands dirty by tackling all topics that you learnt in the previous sections and more.
This course comes with a 30 day money back guarantee! If you are not satisfied in any way, you'll get your money back.
So what are you waiting for? Take advantage of this time to upgrade your skills and put Ansible on your resume with CONFIDENCE!