- Builds python based ansible-core and ansible community package docker images.
In accordance with both ansible community projects, ansible community package and ansible-core, this project builds two seperate images as follows:
| Ansible project | Supported versions | DockerHub Image |
|---|---|---|
| ansible community package |
|
thehedhly/ansible |
| ansible-core |
|
thehedhly/ansible-core |
Build the ansible or ansible-core docker image, run then attach to the container:
docker compose run --build --remove-orphans --rm <ansible|ansible-core>Build the ansible or ansible-core docker image, run command without attaching to the container:
docker compose run --build --remove-orphans --rm <ansible|ansible-core> <command>Build ansible image, run and attach to container
docker compose run --build --remove-orphans --rm ansibleBuild ansible-core image, run and attach to container
docker compose run --build --remove-orphans --rm ansible-coreBuild ansible image, run 'ansible --version' command without attaching to the container
docker compose run --build --remove-orphans --rm ansible ansible --versionBuild ansible-core image, run 'ansible --version' command without attaching to the container
docker compose run --build --remove-orphans --rm ansible-core ansible --versionTo use a specefic ansible or ansible-core version, please see docker-compose.yml and list of supported build arguments.
| Name | description | default |
|---|---|---|
BASE_IMAGE |
Base docker image. | python:3.12.7-slim |
PYCMD |
Python binary location. ℹ️ See also BASE_IMAGE |
/usr/local/bin/python3.11 |
SYS_ZONEINFO |
System time zone. | Europe/Berlin |
ANSIBLE_INSTALL_REFS |
Ansible installation package. You can install a specific version of a ansible community package or ansible-core, e.g.:
|
ansible-core |
ANSIBLE_HOME |
Ansible home where the build's extra (optional) ansible roles/collections are installed. See Ansible requirements.yml |
/usr/share/ansible |
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS |
Build's CLI options for installing ansible collection. Check ansible-galaxy cli documentation for more details. |
-v |
ANSIBLE_GALAXY_CLI_ROLE_OPTS |
Build's CLI options for installing ansible roles. Check ansible-galaxy cli documentation for more details. |
-v |
ANSIBLE_USER |
User to set for ansible image. A home directory is setup for the provided user. The default ansible configuration file for the user is located in his home driectory. | thehedhly |
This project was created by H.Hedhly.