Skip to content
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

RunnerConfig.prepare_env() does not respect the ansible config #1390

Open
braindevices opened this issue Aug 15, 2024 · 1 comment
Open

RunnerConfig.prepare_env() does not respect the ansible config #1390

braindevices opened this issue Aug 15, 2024 · 1 comment
Labels
needs_triage New item that needs to be triaged

Comments

@braindevices
Copy link

I was very confused became apparently our code just wrap around whatever stdout callback class
In theory it should be able to respect whatever stdout callback the user set as default.
But in reality, i cannot get it to respect my ansible.cfg
We even have get_ansible_config to facilitate this feature.

After reading the code I figured out we actually override the callback via the env variable.

But we only respect the ANSIBLE_STDOUT_CALLBACK from the environment in the prepare_env(), which causes this bug.

I think we should respect the full ansible config stack instead of just the envvar, there are several way to do this:

  • most simple, we call get_ansible_config() in the prepare_env() and get the actual stdout_callback value and use it as the ORIGINAL_STDOUT_CALLBACK
  • more correct way may need somehow dynamically interfacing with the base callback instead of statical inheritance. Then the awx_callback can be an independent ansible callback model. The original callback can be set as a plugin option.
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Aug 15, 2024
@sivel
Copy link
Member

sivel commented Aug 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_triage New item that needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants