This results in a failure in the following circumstance:
The ee_base_image var is not defined
base_image is not defined as a top-level key in the execution environment definition
images: base_image: is defined in the execution environment definition
In this situation, the Pull builder images task pulls the image as defined in vars/main.yml. However, since this doesn't match images: base_image:, the Run the Ansible Builder Program task may fail if a login is required to pull the image.
Issue Type
Bug Report
Desired Behavior
The base image should be pulled, respecting the ee_base_registry_username and ee_base_registry_password variables when needed.
Actual Behavior
"Error: creating build container: initializing source docker://registry.redhat.io/ansible-automation-platform-23/ee-supported-rhel8:latest: unable to retrieve auth token: invalid username/password: unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication",
STEPS TO REPRODUCE
Do not set ee_base_image
Use the following definition for an execution environment:
Summary
Documentation indicates that the
section of an execution environment definition will override
ee_base_image
. This is true within execution_environment.yml.j2, but not within the task Pull builder images.This results in a failure in the following circumstance:
ee_base_image
var is not definedbase_image
is not defined as a top-level key in the execution environment definitionimages: base_image:
is defined in the execution environment definitionIn this situation, the
Pull builder images
task pulls the image as defined invars/main.yml
. However, since this doesn't matchimages: base_image:
, the Run the Ansible Builder Program task may fail if a login is required to pull the image.Issue Type
Desired Behavior
The base image should be pulled, respecting the
ee_base_registry_username
andee_base_registry_password
variables when needed.Actual Behavior
STEPS TO REPRODUCE
ee_base_image
Suggested Resolution
Change the
Pull builder images
task fromname: "{{ __execution_environment_definition.base_image | default(ee_base_image) }}"
toname: "{{ __execution_environment_definition.images.base_image | default(__execution_environment_definition.base_image) | default(ee_base_image) }}"