Execution Environment
An Ansible Execution Environment (EE) is used to run Ansible content against devices in my Homelab.
The EE is built using ansible-builder
.
Execution Environment Files
Files relating to the Execution Environment are located in ansible/ee
.
File Path | Description |
---|---|
ansible/ee/execution-environment.yml |
Configuration file used by ansible-builder to create the EE. |
ansible/ee/requirements.txt |
Extra Python dependencies to include in the EE. |
ansible/ee/requirements.yml |
Ansible collection and roles to include in the EE. |
ansible/ee/custom_entrypoint.sh |
Entrypoint script used to configure specific environments variables for the 1Password CLI and SSH agent socket. |
Secrets
The 1Password CLI is installed in the EE to retrieve secrets for devices and services.
Automated Build
A GitHub Action is set up to automatically re-build the EE when changes are made to files in ansible/ee
.
Using the Execution Environment
Ansible Navigator
ansible-navigator
is used on my Macbook M1 Pro Max to run Ansible Content against devices in my Homelab. Under the hood ansible-navigator
uses ansible-runner
to interact with the container engine to launch the EE. I use OrbStack which has a compatible Docker engine.
ansible-navigator
is configured using the ansible-navigator.yml
file. I use specific configuration so that the EE can access the 1Password SSH Agent running on my Macbook to connect to devices. Furthermore, as mentioned above the EE has the 1Password CLI installed which is used by the community.general.onepassword
lookup plugin to retrieve secrets from a 1Password vault.
AWX
The EE is used by my AWX instance to run Ansible Content against devices in my Homelab. See AWX for more information.