• Labs icon Lab
  • Core Tech
Google Cloud Platform icon
Labs

Set Up and Manage a Multi-Node Environment with Ansible

In this lab, you’ll practice setting up Ansible for automation, managing system configurations, and deploying a web server cluster. You’ll begin by configuring the Ansible server and managed nodes, establishing secure, passwordless communication between them. Then, you’ll automate user and firewall settings and deploy Apache/Nginx with virtual hosts to serve static content. By the end, you’ll have a fully automated infrastructure with web servers installed, configured, and accessible via a browser.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 1h 10m
Published
Clock icon Apr 08, 2025

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Getting 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

    Configure Ansible Control and Managed Nodes

    You will first learn how to manage an Ansible control node and a managed node by establishing secure communication between them. You will enable password authentication on the managed hosts by modifying the SSH daemon configuration file. Then, you will configure "passwordless" authentication by generating an SSH key and setting up SSH key-based authentication. Finally, you will then verify the connection between the host and the node.

  3. Challenge

    Automate Basic System Configuration with Ansible Playbook

    Learn how to automate key system administration tasks on managed hosts using Ansible. You will create and execute Ansible playbooks to check system updates, configure users and groups, manage firewall settings, and control system services. Additionally, you will verify configurations using ad-hoc commands.

  4. Challenge

    Automate Apache Deployment with Ansible: Virtual Hosts & Static Content

    In this challenge, you will create an Ansible playbook to automate the deployment of the Apache web server across managed nodes. You will configure virtual hosts using Jinja2 templates, ensuring that each host serves static content from a specified document root. Additionally, you will implement service management to ensure that Apache starts automatically after a reboot. Finally, you will verify the deployment by accessing the configured web servers through a browser, confirming that the virtual hosts are correctly set up and serving content.

  5. 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.

Shikhar is a professional system administrator and consultant that has a particular interest in all things related to Linux administration, shell scripting, cloud, Ansible, and automation. He loves making complex technical topics easy to understand. He is an AWS Certified Solutions Architect Associate. He has utilized his IT skills in many Fortune 500 companies. Shikhar has been teaching since 2015 and provides onsite and online training on many IT subjects.

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.