Hello ansible-devel!
Today the Ansible Engineering Team would like to announce an idea
we’ve been working on called “Execution Environments” which we are
introducing in order to garner feedback and contributions from the
community. We hope this is the start of an ongoing discussion with the
community as we iterate on the ideas outlined below.
What are Execution Environments?
Execution Environments are a unified and opinionated strategy for
executing Ansible automation jobs in containers[0] via Ansible
Runner[1]. This is slated to be an easy way to run playbooks locally
on your laptop, workstation, control host, or (in the future) Ansible
Tower/AWX. This is accomplished using container image(s) as a
consistent base layered with Ansible Core, Ansible Runner, Ansible
Collection Content, and whatever dependencies the plugins and modules
therein may require. This will decouple the software installed on any
particular computer from that which is required for each set of
Ansible Collections, their python dependencies, and any potential
binary dependencies. The methodology we plan to implement here is to
use a new tool called Ansible Builder[2] that manages the definition,
creation, and management of Execution Environments; and then Using
Ansible Runner[1] to take advantage of the resulting Execution
Environment. In summary, Ansible Builder builds them and Ansible
Runner runs them. Execution Environments will be OCI compliant
container images[3] and technically don’t require Ansible Runner, but
the goal of Ansible Runner is to be a consistent entry point that
handles the opinionated execution.
We would like people to take an opportunity to test out this new
functionality to build an Execution Environment using Ansible
Builder[4] and then running playbooks and adhoc commands with Ansible
Runner’s new playbook and adhoc subcommands[5].
If you’re interested in doing this, please consult each project’s
development branch documentation[5][6][2][7]. We would like to
highlight that this is still under heavy development, is being
iterated upon, and we would be grateful for feedback and contributions
from the community to help shape this as we move forward.
Thank you,
-AdamM
(On behalf of Ansible Engineering)
[0] - https://opencontainers.org/
[1] - https://ansible-runner.readthedocs.io/en/stable/
[2] - https://ansible-builder.readthedocs.io/en/latest/
[3] - https://github.com/opencontainers/image-spec
[4] - https://ansible-builder.readthedocs.io/en/latest/usage.html
[5] - https://ansible-runner.readthedocs.io/en/devel/execution_environments.html
[6] - https://github.com/ansible/ansible-runner/blob/devel/CONTRIBUTING.md
[7] - https://github.com/ansible/ansible-builder/blob/devel/CONTRIBUTING.md