Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1737104 - Callback plugins are ignored while running a ansible remote job
Summary: Callback plugins are ignored while running a ansible remote job
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.4.0
Hardware: All
OS: All
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-02 16:27 UTC by roarora
Modified: 2021-03-06 17:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-06 17:44:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30373 0 Normal New Callback plugins are ignored while running a ansible remote job 2021-02-14 13:55:20 UTC
Red Hat Bugzilla 1934110 1 unspecified CLOSED Foreman callback is always used 2024-12-20 19:42:33 UTC

Description roarora 2019-08-02 16:27:56 UTC
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):
6.4

How reproducible:
Always

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

Actual results:
Callback plugins are overriden to empty value

Expected results:
It should read list of callback plugins from configuration and ignore only "foreman" plugin for a rex job.

Additional info:

Comment 3 Ondřej Ezr 2020-07-13 08:52:05 UTC
Created redmine issue https://projects.theforeman.org/issues/30373 from this bug

Comment 4 Ondřej Ezr 2021-03-06 17:44:01 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.