
Hello and Welcome to your course!
I’m Luca Berton, and we’re going to have a lot of fun together.
First of all, let me introduce myself.
I’ve been an Ansible Software Quality Engineer of Red Hat, based in the Czech Republic, even if I’m Italian.
I’ve been more than 15 years of System Administration, working with infrastructure, either on-premise or on the major cloud providers.
I’m an open source enthusiast and support the community by sharing my knowledge in different public access events.
I’m also a co-founder of my hometown Linux Users Group, visited by Richard Stallman, the founder of the Free Software Movement.
I consider myself a lazy person so I always try new ways to automate the repetitive task of my work.
After years of Perl, Bash, and python scripting, I landed in Ansible technology. I took the certification and worked for more than a year with the Ansible Engineer Team.
I consider it the best infrastructure automation technology nowadays; it’s human-readable, the learning curve is accessible, and very requested by the recruiters in the market.
This ultimate guide contains all the obvious and not-so-obvious solutions using Ansible automation.
In every lesson of this course, I will share one specific use case, the possible solution, the code, the execution, and the verification of the target system.
All these solutions are battle-tested and used by me in my simple automation.
You could quickly jump between lessons and review all the times you need.
The course will keep track of the evolution of the Ansible technology, adding more content whenever needed.
Are you ready to have fun?
How to use the ping module, execute a command and retrieve the Ansible Facts from a target node via the ansible command line.
A step-by-step guide inside the Ansible Playbook anatomy.
What is ansible-core? What is the ansible community package? What happened to the Ansible project after version 2.9? An overview of the ansible community and ansible-core packages and use-cases nowadays.
How to install the latest and a specific version of Ansible in Red Hat Enterprise version 8 using Ansible Engine software collection.
How to install Ansible in Amazon Linux 2 using the Amazon Extras Library "amazon-linux-extras" and the EPEL (Extra Packages for Enterprise Linux) repositories.
How to install and maintain the latest version of Ansible inside Fedora 34 using the default repository with a practical demo.
How to install Ansible in Ubuntu 20.04 LTS using the universe and PPA repositories.
How to install Ansible in Ubuntu 21.10 using the universe and PPA repositories.
How to install ansible using the universe and PPA repositories in Ubuntu 22.04 LTS Jammy Jellyfish
How to install and maintain the latest version of Ansible inside Fedora 35 using the default repository with a practical demo.
How to install and maintain Ansible inside CentOS 8 using the EPEL repository with a practical demo.
How to install and maintain Ansible inside CentOS 8 Stream using the EPEL Next repository with a practical demo.
The easier way to install the latest version of Ansible and maintain up-to-date in CentOS 9 Stream using DNF and the "appstream" system repository.
The easier way to install the latest version of Ansible and maintain up-to-date in Debian 11 using APT and the "main" default repository.
How to install the latest version of Ansible in openSUSE using the official SUSE Leap "update" repository.
How to install and maintain up-to-date Ansible inside Rocky Linux 8 using the EPEL repository.
How to Install the latest and a specific version of Ansible with Homebrew Package Manager.
How to install Ansible with PIP - the Python package manager.
How to install and maintain Ansible inside Windows 10 using the Windows Subsystem for Linux and Ubuntu 20.04 LTS.
How to install and maintain up-to-date Ansible inside Windows 11 using the Windows Subsystem for Linux and Ubuntu 20.04 LTS.
The easier way to install the latest version of Ansible and maintain up-to-date in ArchLinux 2021.12.01 using Pacman and the Community repository
The easier way to install and maintain up-to-date Ansible inside Gentoo Linux using the “portage” package manager.
How to install and maintain up-to-date Ansible inside AlmaLinux 8 using the EPEL repository.
How to install and maintain up-to-date Ansible inside Oracle Linux 8 using the EPEL repository.
How to install and maintain up-to-date Ansible inside SUSE Linux Enterprise Server (SLES) 15 SP3 using the SUSE Package Hub repository.
How to install Ansible Core (ansible-core) in RedHat Enterprise Linux 9 Beta included in the RHEL 9 AppStream repository.
How to install and maintain the latest version of Ansible inside Fedora 36 using the system repository with a practical demo.
How to install Ansible Core (ansible-core) in RedHat Enterprise Linux 9 included in the RHEL 9 AppStream repository.
How to install and maintain up-to-date Ansible inside AlmaLinux 9 using DNF and the ”appstream” system repository.
How to install and maintain up-to-date Ansible inside OracleLinux 9 using DNF and the ”appstream” system repository.
How to install and maintain up-to-date Ansible inside Rocky Linux 9 using DNF and the ”appstream” system repository.
How to install and maintain the latest version of Ansible inside Fedora 37 using the system repository with a practical demo.
How to install ansible using the universe repository in Ubuntu 22.10 Kinetic Kudu.
How to install Ansible Core (ansible-core) in RedHat Enterprise Linux 9.1 included in the RHEL 9.1 AppStream repository.
How to install ansible using the universe repository in Ubuntu 23.04 Lunar Lobster.
How to install and maintain the latest version of Ansible inside Fedora 38 using the system repository with a practical demo.
The easier way to install the latest version of Ansible and maintain up-to-date in Debian 12 using APT and the "main" default repository.
How to install Ansible Core (ansible-core) in RedHat Enterprise Linux 9.2 included in the RHEL 9.2 AppStream repository.
How to install and maintain the latest version of Ansible inside Fedora 39 using the system repository with a practical demo.
Streamlining IT Automation: Installing Ansible on Ubuntu 23.10
Streamlining Ansible Projects with Pipenv: A Virtual Environment Management Guide.
Unveiling the Verses: Navigating Virtual Environments with Poetry and Ansible.
How to install ansible using the universe repository in Ubuntu 24.04 LTS Noble Numbat.
How to install ansible using the universe repository in Fedora 40.
Some real-life examples from print “Hello world!”, print a text, print a variable, print a combination of text and variable, and set the verbosity level.
How to pause a playbook execution for a certain amount of minutes or seconds with Ansible.
How to pass or override an Ansible Playbook variable from the command line in plaintext, JSON, or YAML. Very useful to combine some script, automation, or shell variables. Example with fruit variable defined as “banana” and changed to “apple” or “raspberry”.
How to use multi-line YAML variables in Ansible using the “|”, Literal Block Scalar, and the “>”, Folded Block Scalar, operators. Plus how to elide the new line “\n” at the end of the line and print multi-line with debug module on a terminal.
What is the difference between ansible_hostname vs inventory_hostname vs ansible_fqdn in a practical example with Ansible Playbook?
How to set an EXAMPLE environmental variable at play and task Ansible Playbook code level and verify with echo Linux command.
How to execute Ansible command(s) or task(s) on localhost using the connection plugin local and the right ansible internals variables.
Three options to limit the execution of a potentially harmful Ansible Playbook to only one host.
A comparison between command vs shell Ansible modules when you really need to execute commands on Linux target hosts.
How to save the value of a variable to file using the Ansible copy vs template modules. Included the comparison and a step-by-step example.
How to select single or multiple tasks, include, import, play, block, and role in an Ansible Playbook using tags parameter of the ansible-playbook command.
How to list only the enabled features in a network interface using Ansible System Information (Facts) and selectattr filter.
How to use Date, Time, and Timestamp in ISO 8601 format in Ansible Playbook.
How to print the Date Time and Timestamp in ISO 8601 format without using Ansible Facts using the date command-line utility in Ansible Playbook.
How to use the check and diff mode to debug and deeply understand the action performed by your Ansible Playbook.
How to Ansible Internal Variables “Magic” could simplify our automation journey: running Ansible version, inventory details, and execution options
How to display the current execution Ansible Playbook file system path using the “playbook_dir” Magic Variables for debugging and simplifying your automation journey.
How to automate the execution of a “cars.py” custom Python script on a remote machine after transferring it and processing the output as an Ansible JSON variable using Ansible Playbook and script module.
How to build a custom “my_ee” Ansible Execution Environment specifying some custom System (git), Python (boto), and collection (community.aws) dependencies using the ansible-builder command-line tool.
How to run a playbook (“ping.yml”) using a custom “my_ee” Ansible Execution Environment using the ansible-runner command-line tool.
How to avoid the SSH Host Key checking at the beginning of every Ansible execution in our laboratory, CI/CD pipeline, or cloud computing provider.
A Comprehensive Guide to Managing Configuration with ansible-config and ansible.cfg files
How to store variables and files in an encrypted way using the ansible-vault command line utility.
How to use an Ansible Vault in an Ansible Playbook to store a password variable encrypted on disk.
How to decrypt an Ansible vault file using the ansible-vault command line utility.
How to take advantage of different behavior of the synthetic collections with all the critical Ansible modules and plugins.
How to edit a single-line text in a file with Ansible module lineinfile customize your "sshd_config".
Deep dive into the Ansible module blockinfile of the collection "ansible. builtin" to edit multi-line text with Ansible. Live demo and Ansible playbook included.
Deep dive into the Ansible module ping in the collection "ansible.builtin" to test the access to a managed host and that Python is installed. Live demo and Ansible playbook included.
How to reboot remote hosts with Ansible specifying the notification message to logged users, the delay seconds, and the verification command. Live demo and fun included ;-)
How to checkout a git repository via SSH using Ansible module git.
How to checkout a git repository via HTTPS using Ansible module git with some Ansible Playbook example and live demo.
How to copy files from remote hosts with Ansible? Simple code how to copy /var/log/messages from managed host to controller.
How to copy report.txt file to remote hosts using Ansible module copy.
How to list the available Linux services and automate the start and enable service on boot process with Ansible playbook. Included code and demo with "chronyd.service" NTP server on a RedHat Enterprise Linux 8.
How to list the available Linux services and automate the stop and disable service on boot process with Ansible playbook. Included code and demo with "chronyd.service" NTP server on a RedHat Enterprise Linux 8.
How to create and use templates in Ansible Playbooks. An included example is how to deploy an HTML placeholder using the Jinga2 template in your Nginx webserver.
How to restart services on a managed host using Ansible? The service module supports init systems include BSD init, OpenRC, SysV, Solaris SMF, systemd, upstart. I'm going to show you how to restart services on a Linux-managed host with some simple code
How to automate the schedule of command execution to a specific minute, hour, day, month, weekday, and user in Linux using cron service.
How to use for loop in Ansible module template to generate/etc/myhosts file with IP address, hostname, and short name from Ansible inventory. Ansible Playbook, Jinja2 template, and with Magic Variables included.
How to automate the read of /proc/cpuinfo file from Linux remote host with Ansible. The file is copied as base 64 encoding and decoded with an Ansible Filter.
How to automate the download of a file and verify the checksum using an HTTPS proxy with Ansible module get_url and "https_proxy" environment statement.
How to automate the customization of System-Wide Environment Variables on Linux editing /etc/environment file using Ansible module lineinfile.
How to reduce Intel laptop CPU Temperature overheating using Ansible Playbook with package module and zero-configuration Linux thermal daemon (thermald).
How to Download and use the Ansible Role lucab85.ansible_role_log4shell to scan our Linux machine against Log4Shell Remote Code Execution Log4j (CVE-2021–44228) re-using Ansible artifacts (tasks, variables, defaults, handlers, modules, and plugins) published in Ansible Galaxy directory.
How to Download and use the Ansible Collection community.general re-using Ansible artifacts (tasks, variables, defaults, handlers, modules, and plugins) published in Ansible Galaxy directory.
How to build and run a custom “my_ee” Ansible Execution Environment specifying some custom System (git), Python (boto), and collection (community.aws) dependencies using the ansible-builder and ansible-runner toolset.
Streamlining Ansible Role Development with ansible-later.
How to create an empty ~/example.txt file or update the time of an already created file.
How to create a simple text file? I'm going to show you a live demo with some simple Ansible code.
How to check if a file exists in Ansible? I’m going to show you a live demo and some simple Ansible code. I'm going to show you how to combine the "stat" module with conditional to verify an existing and not existing path.
How to set up the "~/example" directory, set the user and group ownership, and UNIX mode '0644' in Linux with Ansible.
Deep dive into the Ansible module stat of the collection "ansible.builtin" to test if a specified path is a directory and print a message. Live demo and Ansible playbook included.
How to rename a file or directory foo, check the file existence, and perform the verification in a live demo and some simple Ansible code.
How to change file or directory permission with Ansible? I’m going to show you a live demo and some simple Ansible code to change chmod and group of a test.txt file.
How to automate the setting of execute permission 755 for example.sh Linux file with Ansible module file.
A real-life example about how the "deleteme" file and the "deleteme" directory with Ansible. Tested in a target Linux machine as well for idempotency of the Ansible Playbook.
How to create an "example" symbolic link that references "/proc/cpuinfo" in Linux with Ansible. Simple Ansible code and verification included.
How to create a "link" hard link that references the "example.txt" text file in the Linux filesystem with Ansible. Simple Ansible code and verification included.
How to download a tarball, verify the checksum, assign some permission with Ansible
Live console coding how to download a zip file and extract it in a user home directory. The playbook is also taking care of the necessary dependencies.
How to Mount a Windows share in Linux SMB/CIFS. The Ansible Playbook code is going to check the required packages, create the mount-point and setup the Windows network shared folder via SMB/CIFS protocol on the Linux target machine. Demo and live coding included.
How to mount an NFS share in Linux. The Ansible Playbook code is going to check the required packages, create the mount-point, and set up the NFS network shared folder using NFS4 protocol on the Linux target machine. Demo and live coding included for RedHat-like and Debian-like systems.
How to automate the concatenation of multiple files and format using a list in the YAML and Ansible module template with Jinja2 language. Included example with “a.txt”, “b.txt” and “includes.yaml” files for Pandoc.
How to automate the backup of an “examples” directory minimizing network usage on Linux using Ansible module synchronize and rsync utility.
How to automate the finding of all files with “.cnf” extension under the “example” directory of “devops” user using Ansible Playbook and vmware_guest_info module.
How to automate the search and delete of the files and directories inside a directory keeping the main folder with Ansible modules find and file.
How to automate the creation of a “test.iso” ISO9660 file containing an “helloworld.txt” file using Ansible Playbook and iso_create module.
How to use the regular expression within an Ansible Playbook.
How to use find, slurp, and debug to read and display all the text files in a directory.
Learn how to use the Ansible quota module to automate disk space quotas for users and groups, ensuring efficient resource management.
How to automate the creation of a new partition /dev/sdb1 on an additional disk initialized for LVM on Linux using Ansible and parted module.
How to create an example user with home directory, groups, password, and SSH key file with Ansible Playbook.
How to remove an example user removing home directory and spool mail files.
How to write an Ansible Playbook to assign the password "password" to an "example" user account in a Linux system with SHA512 encryption.
How to disable an "example" user in Linux by locking the password and setting the special "nologin" shell without login possibility.
How to enable a user without password lock and with the appropriate shell in Linux.
How to ser the user password expiration applying the Linux aging policy system.
How to create the "example" group or verify that is present on your target Linux system or macOS.
How to delete the "example" group or verify that is not present on your target Linux system or macOS.
How to automate the adding of a user “example” to a system or user-defined groups list on a target the Linux with few lines of Ansible playbook code.
How to automate the changing of primary group of a user "example" from "example" to "users" on a target the Linux with few lines of Ansible playbook code.
How to retrieve a JSON list of users via a GET request to a REST API web service HTTPS endpoint from a remote Linux host in a few lines of Ansible code.
How to retrieve a JSON token via a POST authentication request using a JSON body formed by email and password to a REST API web service HTTPS endpoint from a remote Linux host in a few lines of Ansible code.
Step-by-Step Guide to Extend Ansible Functionality with Custom Plugins
Learn the Ansible automation technology with some real-life examples.
Every successful IT department needs automation for bare metal servers, virtual machines, cloud computing, containers, and edge computing. Automate your IT journey with Ansible automation technology.
I'm going to teach you, example by example, how to accomplish the most common System Administrator tasks.
You will start with installing Ansible in RedHat Enterprise Linux, Ubuntu, and macOS using the most command package manager and archives.
Each of the 300+ lessons summarizes a module, from the most critical parameter to some live demo of code and real-life usage. Each code is battle-proved in real life. Every video includes terminal interaction and verification steps. Mundane activities like creating a text file, extracting and archiving, and fetching a repository using HTTPS or SSH connections could be automated with some lines, user management, and interaction with API services; these are only some of the long lists included in the course.
Some Ansible codes are usable in all Linux systems, some specific for RedHat-like, Debian-like, and Windows systems.
The 30+ Ansible troubleshooting lesson teaches you how to read the error message, reproduce it, and the process of troubleshooting and resolution.
Are you ready to automate your day with Ansible?