You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the ansible-navigator needs to pull the defined EE container image the pull is not successful if the pull arguments uses an environment variable (e.g. ${HOME)).
----------------------------------------------------------------------------------------------------
Execution environment image and pull policy overview
----------------------------------------------------------------------------------------------------
Execution environment image name: quay.io/branic/my-aws-ee:latest
Execution environment image tag: latest
Execution environment pull arguments: '--authfile ${HOME}/path/to/auth_file.json'
Execution environment pull policy: missing
Execution environment pull needed: True
----------------------------------------------------------------------------------------------------
Updating the execution environment
----------------------------------------------------------------------------------------------------
Running the command: podman pull --authfile '${HOME}/path/to/auth_file.json' quay.io/branic/my-aws-ee:latest
Error: stat ${HOME}/path/to/auth_file.json: no such file or directory
Error: initializing source docker://quay.io/branic/my-aws-ee:latest: reading manifest latest in quay.io/branic/my-aws-ee: unauthorized: access to the requested resource is not authorized
Please review the log for errors.
Notice that the Error line is reporting ${HOME} instead of the expanding the variable contents (e.g. /home/my_username).
STEPS TO REPRODUCE
Create an EE that is in a registry that needs authentication to pull the image
Use the above defined ansible-navigator config file and replace the path to the registry authorization file, ensuring that an environment variable is used in the path.
Use ansible-navigator to run a playbook causing ansible-navigator to try and pull the image
EXPECTED RESULTS
ansible-navigator is able to pull the image
ACTUAL RESULTS
ansible-navigator failed to pull the image due to the ' around the arguments causing the shell to not expand the the variable (${HOME}).
ADDITIONAL INFORMATION
The error can be reproduced with podman running the same exact command.
podman pull --authfile '${HOME}/path/to/auth_file.json' quay.io/branic/my-aws-ee:latest
Error: stat ${HOME}/path/to/auth_file.json: no such file or directory
Removing the ' around the argument allows podman to pull the image.
Also, removing the quotes in the config file (e.g. changing - "--authfile ${HOME}/path/to/auth_file.json" to - --authfile ${HOME}/path/to/auth_file.json) has no effect on the command that anisble-navigator runs.
The text was updated successfully, but these errors were encountered:
branic
added
bug
Researched, reproducible, committed to fix
new
New issues and PRs to triaged
labels
Jul 20, 2023
ISSUE TYPE
SUMMARY
If the ansible-navigator needs to pull the defined EE container image the pull is not successful if the pull arguments uses an environment variable (e.g.
${HOME)
).ANSIBLE-NAVIGATOR VERSION
CONFIGURATION
LOG FILE
Notice that the
Error
line is reporting${HOME}
instead of the expanding the variable contents (e.g./home/my_username
).STEPS TO REPRODUCE
EXPECTED RESULTS
ansible-navigator is able to pull the image
ACTUAL RESULTS
ansible-navigator failed to pull the image due to the
'
around the arguments causing the shell to not expand the the variable (${HOME}
).ADDITIONAL INFORMATION
The error can be reproduced with podman running the same exact command.
Removing the
'
around the argument allows podman to pull the image.Also, removing the quotes in the config file (e.g. changing
- "--authfile ${HOME}/path/to/auth_file.json"
to- --authfile ${HOME}/path/to/auth_file.json
) has no effect on the command that anisble-navigator runs.The text was updated successfully, but these errors were encountered: