Ansible Architecture, Configuration & Automated Inventory — Challenge
Have Ansible discover your EC2 instances by tag instead of maintaining a host list nobody remembers to update.
- Time
- 19 min
- Level
- Intermediate
- Objectives
- 4 objectives
- Cost
- Low cost
Where this fits in the platform
This lab adds
- Hosts discovered by tag rather than typed into a file
Before you start
Cost — Low cost
— Ansible itself is free; the cost is whichever EC2 instances it configures. A `t3.micro` control node is inside the free tier.
The goal#
Build Ansible Architecture, Configuration & Automated Inventory yourself, starting from an empty directory, without following the guided steps.
Everything you need is in the criteria above. Work down them one at a time, and verify each before moving to the next.
Hands-on environment
Run it on your own machine
Run this lab on your own machine. One command starts the environment, with everything the lab needs already installed:
Runs against the node1 container with the static inventory. Anything the challenge asks you to discover dynamically from EC2 needs an AWS account.
You will need:
- ansible
git clone https://github.com/EgyKode/EgyKode-lab.git
cd EgyKode-lab
./egykode start
./egykode shellYou need Docker and Git installed. Everything else runs inside the environment. The first start downloads it and takes a few minutes; later starts are seconds.
Not sure what you already have? Run: npm run doctor — it checks and changes nothing.
Run it on AWS
This lab builds real cloud infrastructure, so it needs your own AWS account. Follow the cost and cleanup notes above — the resources are yours, and so is the bill.
Anything you tick here is your own record. EgyKode cannot see inside that terminal, so the success criteria stay self-assessed even when the environment checks your work for you.
Rules#
- Do not open the guided lab until you have genuinely tried.
- When something fails, read the error before you search. The error message is the lesson.
- Tear down anything billable as soon as you finish.
If you get stuck#
The guided lab is one click away at the bottom of this page. Using it is not failure — coming back and repeating the challenge afterwards is the point.
You are done when
0 of 4
The concept behind it
Next up
Lab 29 of 59 on the project path