---
title: "Ansible-HandsOn — Containerized Ansible lab with browser IDE"
url: https://daily.dev/posts/ansible-handson-containerized-ansible-lab-with-browser-ide-leyu6ulu5
source_url: https://daily.dev/posts/ansible-handson-containerized-ansible-lab-with-browser-ide-leyu6ulu5
type: freeform
source: "DevOps"
author: "Yoas1"
published: 2026-05-25T17:09:17.425Z
updated: 2026-05-25T17:09:36.433Z
tags: ["devops", "docker", "iac", "ansible"]
reading_time: 1
upvotes: 5
comments: 1
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Ansible-HandsOn — Containerized Ansible lab with browser IDE

**[DevOps](https://daily.dev/sources/joindevops)** · [@yoas1](https://daily.dev/yoas1) · 1 min read · 5 upvotes · 1 comments

## Summary

A portable, containerized Ansible lab that runs via Docker Compose, featuring a browser-based VS Code IDE (code-server) on port 8080, one controller node, and two worker nodes (Ubuntu 22.04 and Red Hat UBI 9). Pre-configured with Ed25519 SSH keys, inventory, ansible.cfg, Vault, linters, and pre-commit hooks (yamllint, ansible-lint, shellcheck, markdownlint). Hot-reload support via inotifywait makes config changes instant. Ideal for learning Ansible or testing playbooks without manual VM setup.

## Content

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

## Community discussion

Top comments from developers on daily.dev.

**@buguno** · 1 upvotes

> Great, I will test

## Similar posts on daily.dev

- [Hands on Automation with Ansible](https://daily.dev/posts/hands-on-automation-with-ansible-gtee8vdg5) · Faun · 25 upvotes · 0 comments
- [Red Hat Ansible development workspaces for governed automation content creation](https://daily.dev/posts/red-hat-ansible-development-workspaces-for-governed-automation-content-creation-amgt7nuwh) · Red Hat Developer · 1 upvotes · 0 comments
- [Try the Ansible playbook generation lab with Gemini and OpenAI](https://daily.dev/posts/try-the-ansible-playbook-generation-lab-with-gemini-and-openai-cntxcan1w) · Red Hat Developer · 0 upvotes · 0 comments

---

Tags: [#devops](https://daily.dev/tags/devops), [#docker](https://daily.dev/tags/docker), [#iac](https://daily.dev/tags/iac), [#ansible](https://daily.dev/tags/ansible)

[View this post on daily.dev](https://daily.dev/posts/ansible-handson-containerized-ansible-lab-with-browser-ide-leyu6ulu5)
