This is my demo Execution Environment for Ansible Automation Platform.
- build.sh -- A wrapper script, to pass the required env vars.
- execution environment.yml -- Main EE definition
- requirements.txt -- Python dependencies
- requirements.yml -- Ansible Collection dependencies
I store my secrets for connecting to my Private Automation Hub in environment variables that I pass in at runtime.
I have a ~/.pah_tokens file that contains:
export ANSIBLE_GALAXY_SERVER_PAH_CERTIFIED_URL=https://<server>/api/galaxy/content/rh-certified
export ANSIBLE_GALAXY_SERVER_PAH_COMMUNITY_URL=https://<server>/galaxy/content/community
export ANSIBLE_GALAXY_SERVER_PAH_VALIDATED_URL=https://<server>/api/galaxy/content/validated
export ANSIBLE_GALAXY_SERVER_PAH_CERTIFIED_TOKEN='<token>'
export ANSIBLE_GALAXY_SERVER_PAH_COMMUNITY_TOKEN='<token>'
export ANSIBLE_GALAXY_SERVER_PAH_VALIDATED_TOKEN='<token>'
export ANSIBLE_GALAXY_SERVER_LIST=pah_validated,pah_certified,pah_community
I then bring that into my shell with: . ~/.pah_tokens, and run ./build.sh, which passes them into ansible-builder.