hands-on lab

Getting Started with Ansible

Intermediate
1h
3,194
4.8/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Ansible is a tool for automating configuration management, application deployment, and server provisioning. It's relatively lightweight as it has few dependencies, which means it can be easily deployed to manage and configure computing resources.

Learning how to create a playbook to configure a server is one of the basic use-cases for Ansible.

In this lab, you will create a playbook that installs and configures the first three elements of the classic Linux Apache Mysql PHP (LAMP) web application software stack. 

Learning Objectives

Upon completion of this intermediate-level lab, you will be able to:

  • Use the command line to create a new Ansible playbook
  • Install and configure the Apache webserver using an Ansible playbook
  • Make your playbook more reusable by adding variables

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • The Bash command line
  • Ansible playbooks
  • YAML

The following courses and labs can be used to fulfill the prerequisites:

Updates 

January 4th, 2024 - Resolved an issue that caused the lab to fail to setup on rare occasions

December 14, 2021 - Updated format of the lab

January 10th, 2019 - Added a validation Lab Step to check the work you perform in the Lab

About the author
Avatar
Antonio Angelino
Senior DevOps Engineer
Students
26,553
Labs
4
Courses
1

Antonio is an IT Manager and a software and infrastructure Engineer with 15 years of experience in designing, implementing and deploying complex webapps.

He has a deep knowledge of the IEEE Software and Systems Engineering Standards and of several programming languages (Python, PHP, Java, Scala, JS).

Antonio has also been using and designing cloud infrastructures for five years, using both public and private cloud services (Amazon Web Services, Google Cloud Platform, Azure, Openstack and Vmware vSphere).

During his past working experiences, he designed and managed large web clusters, also developing a service orchestrator for providing automatic scaling, self-healing and a Disaster Recovery Strategy.

Antonio is currently the Labs Product Manager and a Senior DevOps Engineer at Cloud Academy; his main goal is providing the best learn-by-doing experience possible taking care of the Cloud Academy Labs platform.

Covered topics
Lab steps
Logging In to the Amazon Web Services Console
Connecting to an EC2 Instance Using Amazon EC2 Instance Connect
Creating a Basic Ansible Playbook
Ensuring Services are Started in your Ansible Playbook
Adding Variables to your Ansible Playbook