CloudSprocketLabs
Menu

Quick start

From git clone to pong in under ten minutes

You need Git, Docker and a terminal. Or skip all three and open the lab in Codespaces.

1. Get the lab

bash
git clone https://github.com/Ali-Shaikh/ansible-practical-lab.git
cd ansible-practical-lab

Zero-install alternative: open the repo in GitHub Codespaces and run the same commands in the browser terminal.

2. Run the pre-flight check

doctor verifies Git, Docker, Compose and free ports before anything starts, and names the exact problem when a check fails.

bash
./lab doctor
PowerShell
.\lab.ps1 doctor

3. Start the estate

The first run downloads base images and builds the four managed hosts, so give it a few minutes. Every run after that takes seconds.

bash
./lab up
PowerShell
.\lab.ps1 up

4. Run your first Ansible command

bash
./lab ping
PowerShell
.\lab.ps1 ping

Four SUCCESS => "pong" responses mean Ansible read the inventory, reached every host over SSH and ran code on each one.

5. Apply your first playbook

The baseline playbook brings every host to a known starting state. Run it twice and watch the second run change nothing; that is idempotence, and it is the heart of Ansible.

bash
./lab play playbooks/10_baseline.yml

6. Optional: the web studio

Prefer one window for everything? ./lab studio starts VS Code in your browser with the repo open and a terminal that already has the lab tools.

bash
./lab studio

Where next

The repo README is the source of truth for every command, including adding your own hosts and the optional systemd mode. For the full walkthrough with troubleshooting, read Set Up an Ansible Practice Lab in Under 10 Minutes.