Multiline environment variables are not passed correctly to EE · Issue #1980 · ansible/ansible-navigator · GitHub
More Web Proxy on the site http://driver.im/
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
When a multiline environment variable is passed or set in the ansible-navigator config file, the env file generated by ansible-navigator for use in the EE is invalid resulting in an error parsing the file during initialization of ansible-navigator similar to:
and then creating a new credential with this new type where the GPG key is plain pasted into the passbolt_private_key field. It is correctly passed through to the EE by AWX.
This should be possible too somehow when using ansible-navigator, but I have yet to find a way that actually works. I have been experimenting with \n and \\\n which makes ansible-navigator and/or podman to parse the env file succesfully. But the GPG key is not recognised by the passbolt lookup plugin that is using this environment variable.
msg: 'An unhandled exception occurred while running the lookup plugin ''anatomicjc.passbolt.cached''.
Error was a <class ''ValueError''>, original message: Expected: ASCII-armored
PGP data. Expected: ASCII-armored PGP data'
ISSUE TYPE
SUMMARY
When a multiline environment variable is passed or set in the ansible-navigator config file, the env file generated by ansible-navigator for use in the EE is invalid resulting in an error parsing the file during initialization of ansible-navigator similar to:
ANSIBLE-NAVIGATOR VERSION
CONFIGURATION
LOG FILE
STEPS TO REPRODUCE
Define an environment variable containing newlines. For example (in my case) an PGP private key:
and set ansible-navigator to pass the PASSBOLT_PRIVATE_KEY:
or define the environment-variable in the yaml config similar to:
EXPECTED RESULTS
ansible-navigator passing the environment variable as is, including the newlines, to the execution environment.
ACTUAL RESULTS
ansible-navigator fails on parsing the generated env-file
ADDITIONAL INFORMATION
The content of the generated env file is similar to:
The text was updated successfully, but these errors were encountered: