AI-assisted Ansible development environment as a dev container template. Claude Code with Ansible MCP servers, skills, and the Abbenay AI gateway pre-configured, built on the official community-ansible-dev-tools image. One command to start.
Built on the community-ansible-dev-tools container image (Fedora) — the same toolchain Red Hat ships for Ansible development. The base image version is pinned in the Dockerfile. Includes all 10 tools from the ansible-dev-tools bundle:
ansible-core, ansible-builder, ansible-creator, ansible-lint, ansible-navigator, ansible-sign, molecule, pytest-ansible, tox-ansible, ansible-dev-environment
Plus podman for execution environment support.
Claude Code CLI with Ansible-specific integrations configured at container startup. MCP servers are also auto-configured for Copilot, Gemini CLI, and Cursor — see Multi-Harness AI Support below.
- ansible-know-mcp — module/role documentation lookup, Galaxy search, skill generation
- ansible-devtools-mcp — ansible-lint, ansible-navigator, project scaffolding, best practices
- ansible-skills plugin — skills for scaffolding roles/collections/EEs/molecule scenarios, reviewing code against CoP good practices, querying Ansible docs, and applying the Zen of Ansible
All integrations are configured automatically at container startup — no manual MCP setup required.
The container generates instruction files and MCP config files at startup for multiple AI coding assistants:
| Harness | Instructions | MCP Config | Setup |
|---|---|---|---|
| Claude Code | CLAUDE.md (imports AGENTS.md) |
.mcp.json |
Automatic |
| GitHub Copilot (VS Code) | AGENTS.md |
.vscode/mcp.json |
Automatic |
| GitHub Copilot (CLI) | AGENTS.md |
.mcp.json |
Automatic |
| Gemini CLI | AGENTS.md |
.gemini/settings.json |
Automatic |
| Cursor | AGENTS.md |
.cursor/mcp.json |
Automatic |
| OpenAI Codex CLI | AGENTS.md |
~/.codex/config.toml |
Manual MCP setup |
| JetBrains Junie | AGENTS.md |
IDE Settings | Manual MCP setup |
| Windsurf/Devin | AGENTS.md |
User config | Manual MCP setup |
AGENTS.md contains universal Ansible development rules (coding
standards, toolchain info, MCP server descriptions, key paths) readable by
any AI coding assistant.
CLAUDE.md adds Claude Code-specific context: MCP tool prefixes,
installed skills, and /slash command workflows.
MCP config files register the ansible-know and ansible-devtools MCP servers in each harness's native format.
All generated files use marker comments or jq merge to preserve existing
user content — they are never overwritten. Generated files can be committed
to git (team shares the config) or added to .gitignore.
Add to ~/.codex/config.toml:
[mcp_servers.ansible-know]
command = "uvx"
args = ["ansible-know-mcp"]
[mcp_servers.ansible]
command = "npx"
args = ["-y", "@ansible/ansible-mcp-server", "--stdio"]In your JetBrains IDE: Settings > Tools > AI Assistant > Model Context Protocol (MCP) — add each server with the same command and args shown above.
Abbenay is bundled as an OpenAI-compatible API gateway that abstracts 19+ LLM providers behind a single endpoint. The daemon starts automatically on port 8788 and can be used by Ansible Lightspeed or any tool that speaks the OpenAI API.
Set ABBENAY_VERSION=none as a build arg to opt out.
The template supports multiple AI backends for Claude Code and Abbenay. All variables are optional and forwarded from your host.
Claude Code — configure the Claude Code CLI and VS Code extension. Use either an Anthropic API key or Vertex AI credentials.
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key (alternative to Vertex AI or claude login) |
CLAUDE_CODE_USE_VERTEX |
Enable Vertex AI backend |
ANTHROPIC_VERTEX_PROJECT_ID |
GCP project ID |
CLOUD_ML_REGION |
Vertex AI region, e.g. us-east5 |
Abbenay — configure these to use Abbenay as an AI gateway for Ansible Lightspeed, GitHub Copilot, and other VS Code extensions that use the Language Model API. Abbenay also exposes an OpenAI-compatible endpoint on port 8788. Set the variables for whichever LLM provider you want to use (Vertex AI, OpenRouter, Google AI Studio, or local Ollama).
| Variable | Description |
|---|---|
GOOGLE_VERTEX_PROJECT |
GCP project ID (for Vertex AI providers like Claude, Gemini) |
GOOGLE_VERTEX_LOCATION |
Vertex AI region |
OPENROUTER_API_KEY |
OpenRouter API key (access to 100+ models) |
GOOGLE_GENERATIVE_AI_API_KEY |
Google Generative AI API key (for Gemini via AI Studio) |
The container mounts ~/.config/gcloud read-only for credential access. Vertex AI users do not need an Anthropic account or API key.
All environment variables are optional and forwarded from your host automatically.
| Variable | Description |
|---|---|
GH_TOKEN |
GitHub personal access token (for gh CLI and GitHub MCP) |
ANSIBLE_GALAXY_SERVER_AUTOMATION_HUB_TOKEN |
Ansible Automation Hub token (also populates AH_TOKEN and ANSIBLE_GALAXY_SERVER_AH_TOKEN) |
REGISTRY_REDHAT_IO_TOKEN |
Red Hat container registry (registry.redhat.io) token |
QUAY_TOKEN |
Quay.io container registry token |
DOCKER_TOKEN |
Docker Hub token |
DOCKER_USER |
Docker Hub username (required with DOCKER_TOKEN) |
Container registry tokens are used at startup to authenticate via podman login, enabling pulls of execution environment images from private registries.
The container uses named container volumes (Docker or Podman) to persist data across rebuilds:
- Bash history — command history survives container recreation
- Claude config (
~/.claude) — Claude Code settings, MCP config, and session data - VS Code extensions — avoids reinstalling extensions on rebuild
- gh CLI config (
~/.config/gh) — GitHub CLI authentication and settings
Claude Code, Ansible, YAML, Python, Pylance, Black, AsciiDoc
- Docker or Podman running on your host
- VS Code with the Dev Containers extension
- A Claude Code account (Anthropic API key, Vertex AI credentials, or
claude login)
- Open your project in VS Code
Ctrl+Shift+P/Cmd+Shift+P-> Dev Containers: Add Dev Container Configuration Files...- Select Add to workspace
- Search for Ansible Development Tools
- No additional options to configure — select OK / Done
- Dev Containers: Reopen in Container
Alternatively, select Add to user data folder in step 3 to store the configuration in your VS Code user settings instead of the project. This lets you use the same devcontainer across multiple projects without adding files to each repo.
Apply the template to your project directory, then open it in VS Code:
cd your-ansible-project/
npx @devcontainers/cli templates apply \
-t ghcr.io/leogallego/ansible-claude-code-devcontainer/claude-code-ansibleThen in VS Code: Ctrl+Shift+P / Cmd+Shift+P -> Dev Containers: Reopen in Container
The first build pulls the base image and installs dependencies (~3-5 minutes). On startup the container automatically:
- Installs the Claude Code CLI
- Installs the ansible-skills plugin with all available skills
- Generates
AGENTS.mdandCLAUDE.mdinstruction files - Creates MCP config files for Claude Code, Copilot, Gemini CLI, and Cursor
- Extracts and starts the Abbenay daemon on port 8788
- Runs container registry authentication (if credentials are provided)
Subsequent starts reuse cached layers and are fast.
Once inside the container, run claude in the terminal. On first launch you'll be prompted to authenticate — follow the instructions to log in with your Anthropic account or API key.
For Vertex AI authentication, see the AI Provider Support section above.
From inside the container:
echo $DEVCONTAINER_TEMPLATE_VERSION
# or
cat /etc/devcontainer-version- Fork the repository.
- Make changes in the
src/directory. - Test locally with
devcontainer templates applyor by opening the template in VS Code. - Open a pull request.
GPL-3.0