Description of problem:
If we add extra callback plugins in ansible configuration, they are ignored while running remote ansible jobs and hence output of callback plugins is not there in the UI.
Consider we add timer, profile_tasks plugins which show some extra time statistics for the playboook run
# grep callback_whitelist /usr/share/foreman-proxy/.ansible.cfg
callback_whitelist = foreman, timer, profile_tasks
When any ansible remote job is run like package\service action, the output of added callback plugins is not there in the satellite as they are overridden in the code for a remote command :
# egrep CALLBACK_WHITELIST ./lib/foreman_ansible_core/command_creator.rb
defaults['ANSIBLE_CALLBACK_WHITELIST'] = '' if rex_command?
When running assigned ansible roles, the output of plugins is present as CALLBACK_WHITELIST is not oveerriden in this case.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Add timer, profile_tasks callback plugins to /usr/share/foreman-proxy/.ansible.cfg
2. Run a ansible provider based remote job and output of callback plugins is missing there
Callback plugins are overriden to empty value
It should read list of callback plugins from configuration and ignore only "foreman" plugin for a rex job.
Created redmine issue https://projects.theforeman.org/issues/30373 from this bug
This issue will not be addressed as it is only for ansible-playbook runner that was deprecated, hidden and will be removed completely in 6.10.
Mechanism of disabling the callback in a new mechanism (ansible-runner) is address in BZ#1934110 and will disable only the correct callback instead of all of them.