Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Core Tech
Google Cloud Platform icon
Labs

Automate Common Admin Tasks with Ansible

In this lab, you’ll practice building an Ansible project automating common systems administration tasks, such as file and user account management. When you’re finished, you’ll have a basic Ansible playbook that manages a fleet of Linux servers.

Google Cloud Platform icon
Lab platform
Lab Info
Rating
(374)
Level
Beginner
Last updated
Aug 04, 2025
Duration
1h 35m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Get Started in the Lab Environment

    Here are the initial instructions and explanation of the lab environment. Read this while your environment is busy creating itself from nothing. Yes, this violates physics; we know. How fun!

  2. Challenge

    Build YAML-Based Ansible Inventory

    To start with, you will build a simple Ansible inventory from scratch by creating and populating a YAML file containing reachability and authentication information for two Linux hosts that will be managed by Ansible. You will also learn how to confirm the Ansible inventory is structured properly through the "ansible-inventory" command.

  3. Challenge

    Confirming Host Reachability with Ansible

    You will verify that Ansible can connect to both Linux hosts using information within the Ansible inventory file, and will do this via a series of ad hoc Ansible commands.

  4. Challenge

    Creating Files and Directories with Ansible

    Here, you will create a simple Ansible playbook that creates specific directories and files on Ansible-managed hosts. You will use a simple technique to have Ansible populate specific files with static content. You will also manage the permissions and ownership of files and directories on Ansible-managed hosts. Through this challenge, the concept of idempotency–where Ansible automation does not make changes to managed hosts unless changes need to be made–will be reinforced.

  5. Challenge

    Creating and Managing User Accounts on Hosts

    You will now build off the Ansible playbook developed in the previous challenge by adding tasks to create user accounts on your Ansible-managed hosts. You will also learn how to manage group membership of the newly created user accounts.

  6. Challenge

    Managing File Permissions and Ownership

    In prior challenges, you created a new file and a new directory, as well as a new user account and a new group. Now, you will tie both concepts together; in this challenge, you will augment your Ansible playbook to factor in file permissions and ownership.

  7. Challenge

    Scoping Ansible Execution against Hosts

    Finally, you will continue to iterate on the Ansible playbook developed in previous challenges by adding tags to tasks within your Ansible playbook. You will then learn how to leverage tags, as well as limit the execution of Ansible automation to specific hosts in your inventory.

  8. Challenge

    The Last Challenge

    Welcome to the final challenge! This is your last chance to experiment in the environment. Clicking Finish Lab will end this little world that flittered into existence just for you.

About the author

Christopher Hart is a Technical Consulting Engineer for Cisco specializing in enterprise and data center network solutions, Python, and network automation solutions.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight