
Built a Dockerized Ansible lab with a browser-based IDE
I built a portable Ansible lab that spins up in seconds using Docker. Thought some of you might find it useful for learning or testing playbooks.
https://github.com/Yoas1/ansible-handson
The setup:
- **1 controller** (Python + Ansible + code-server IDE on port 8080)
- **2 workers** — one Ubuntu 22.04, one Red Hat UBI 9
- Pre-configured SSH keys (Ed25519), inventory, ansible.cfg, Vault, and linters
You literally run `docker compose up`, open your browser, and start writing/running playbooks. No manual VM setup, no SSH config headaches.
What I like about it:
- **Hot-reload configs** — edit .config/ files and inotifywait auto-applies them via update_config.sh
- **Pre-commit hooks** built in — yamllint, ansible-lint, shellcheck, markdownlint all run before commit
- **Multi-distro workers** — test your playbooks against both Debian-based and RHEL-based systems
- **Code-server** — full VS Code in the browser with Ansible and Python extensions
Would love feedback or ideas for improvement. The full setup is on my GitHub if anyone wants to check it out.
Cheers