Ansible Core
Status
Section titled “Status”Version: 1.0.0 | Tests: Passing
{
"features": {
"ghcr.io/infrashift/trusted-devcontainer-features/ansible-core:latest": {
"target_version": "2.18.2",
"target_python_version": "3.12"
}
}
} Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
target_version | string | 2.18.2 | Select the ansible-core version to install |
target_python_version | string | 3.12 | Select which Python version to use for the ansible-core venv |
Dependencies
Section titled “Dependencies”How It Works
Section titled “How It Works”Ansible Core is installed into a dedicated virtual environment managed by UV, the fast Python package manager from Astral. Rather than installing ansible-core globally or cluttering the system Python, this feature creates a fully isolated environment that keeps your devcontainer clean and reproducible.
The install script delegates to an Ansible playbook via uv run --with ansible-core ansible-playbook, which bootstraps the installation process. It creates an isolated Python venv at the specified version, installs ansible-core into it, and symlinks the ansible, ansible-playbook, and related binaries into ~/.local/bin so they are available on PATH.
This feature depends on the Python feature, which itself depends on UV & Ruff. When you include ansible-core in your devcontainer configuration, the dependency chain ensures that UV is installed first, then Python is set up at the requested version, and finally ansible-core is installed into its own venv. This layered approach means you can pin both the Python version and the ansible-core version independently.