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.
    • Cloud
Google Cloud Platform icon
Labs

Ansible Archiving

Being able to do normal system tasks, such as performing archives and backups, is one of the key skills for success with using Ansible. The ability to do this is also an objective now, on the *Red Hat Certified Ansible Specialist* exam. In this hands-on lab we will use a playbook with the archive module. We'll make it archive a folder, then transfer the resulting archives from several servers back to the Ansible control server. This will be used for backup purposes. Note: Ansible has been setup and configured for use on the Control server and two nodes. This will save time when doing the hands-on lab. *This course is not approved or sponsored by Red Hat.*

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 04, 2025
Duration
30m

Contact sales

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

    Sign onto the Ansible Control Node Server as cloud_user and Change to the ansible User. Test to Ensure Ansible Has Been Set up for You

    Sign into the server called Ansible Control Node using the cloud_user and change to the ansible user via the su - ansible command.

    Test that ansible is working via an ad-hoc command.

    A possible command to use is the following:

    ansible all -m ping
    

    Note: It may take several minutes after the start of the lab for the test to work as expected.

  2. Challenge

    Create an Ansible Playbook Called backup-logs.yml. The Playbook Should Create a Compressed Backup of the /var/log Folder on Each of the Nodes

    The Ansible playbook should create a backup of the /var/log folder to the /home/ansible folder and call the compressed copy of the log files, logs.tar.gz.

  3. Challenge

    Using Another Ansible Module, Copy the Compressed Log Files to the Control Node. Ensure the Name Is Unique and Related to Which Node It Has Come From

    Using the fetch module, fetch from each node a copy of the compressed log file back to the control node. The file on the control node should be a name that relates to which node it came from.

  4. Challenge

    Uncompress One of the Files That Has Been Downloaded and Make Sure It Is a Copy of the Files That Are in the /var/log Folder on the Node

    Uncompress one of the archived files that has been copied to the control node and test to ensure it is a valid copy of the files as they exist on the node.

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

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