Ansible Core
Status
Section titled “Status”Version: 1.7.2 | Tests: Passing
{
"features": {
"ghcr.io/infrashift/trusted-devcontainer-features/ansible-core:latest": {
"target_version": "2.21.5",
"target_python_version": "3.14"
}
}
} Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
target_version | string | 2.21.5 | Select the ansible-core version to install |
target_python_version | string | 3.14 | 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 the shared runner at /opt/bootstrap/run-feature.sh, which executes the role from the pinned Ansible environment provisioned by the bootstrap feature. The role installs ansible-core as a uv tool at the requested version and symlinks ansible, ansible-playbook, and the related binaries into ~/.local/bin so they are on PATH.
Note the distinction: the ansible-core installed by this feature is yours, for your own playbooks. It is separate from the pinned ansible-core inside /opt/bootstrap/.bootstrap that installs the features themselves, which is root-owned and not on your 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.