This repository includes ready-to-use files as an example to run Ansible Runner.
- CentOS Stream 9 (Minimal)
- Python 3.11
- Docker 25.0.4
- Ansible Runner 2.4.0
python3 -m pip install ansible-runner
Refer projects/demo.yml
and env/settings
to review existing playbook and configuration.
Your own Execution Environment can be used using container_image
in env/settings
. Refer the guide for Ansible Builder to build your own Execution Environment.
The sample playbook in this repository will help you figure out the differences between Execution Environments, such as Ansible version, pip list
, etc.
cd runner
ansible-runner run . -p demo.yml
The settings can also be given directly as arguments like --container-image
without using env/settings
.
- If
process_isolation
is set tofalse
as default,ansible-runner
will just work as a wrapper for the localansible-playbook
command. - If
process_isolation
is set totrue
,connection: local
points to the container itself, so the playbook cannot affectlocalhost
which means the container host. To avoid this, you need to SSH to local host without usingconnection: local
. Related issues is here. container_image
defaults toquay.io/ansible/ansible-runner:devel
. You can check available tags for the public Execution Environment atquay.io/ansible/ansible-runner
- The image from
quay.io/ansible/awx-ee
which is default Execution Environment for AWX also can be specified. - The
process_isolation_show_paths
described in the documentation does not work with Docker and Podman. Instead, you can usecontainer_volume_mounts
as described inenv/settings
, but this is not documented.