Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #35456 - Source environment before starting ansible-runner #66
Fixes #35456 - Source environment before starting ansible-runner #66
Changes from 2 commits
2f7b660
fc161ff
bfa748d
132c7b4
c86a482
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in theforeman/puppet-foreman_proxy#777 (comment) I wonder if we should present everything as environment variables by default. In that case I'd probably extract the env var construction to a separate method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
ANSIBLE_ENVIRONMENT_FILE
an Ansible configuration value or something we are making up? I ask because if this is something we are making up we should probably avoid using theANSIBLE_
prefix as that is a "known" pattern amongst Ansible configuration values when provided via environment variable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is something I made up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A thought to avoid potential issues there would be to use your prefix from above
SMART_PROXY_ANSIBLE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me
SMART_PROXY_ANSIBLE_ENVIRONMENT_FILE
reads like it is a file that should contain environment for smart-proxy-ansible, not ansible spawned by smart-proxy-ansible, but sure, why notThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair. Naming is hard. Maybe @evgeni has an opinion as our resident expert on all things "fun" that can get us in trouble with Ansible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
SMART_PROXY_ANSIBLE_
is a good prefix for config options for the smart_proxy_ansible plugin. In a container you'd probably do the same thing for all options.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to push up new changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erm, yes, sorry. It is out now