Project

General

Profile

Actions

Bug #30373

closed

Callback plugins are ignored while running a ansible remote job

Added by Ondřej Ezr over 4 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1737104

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
-------------------
  1. 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 :
-----------------
  1. 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:


Related issues 1 (0 open1 closed)

Related to Ansible - Bug #23879: Ansible REX job shall not update host Configuration statusClosed06/11/2018Actions
Actions #1

Updated by Ondřej Ezr over 4 years ago

  • Related to Bug #23879: Ansible REX job shall not update host Configuration status added
Actions #2

Updated by Ondřej Pražák over 4 years ago

  • Subject changed from Callback plugins are ignored while running a ansible remote job to Callback plugins are ignored while running a ansible remote job

Is this still relevant since playbook runner is now a legacy option and everyone should move to ansible-runner?

Actions #3

Updated by Ondřej Ezr over 3 years ago

  • Status changed from New to Rejected

Yep, you are correct Ondrej.
This is no longer valid as ansible-playbook is deprecated and the code is about to get removed.
Disabling callback for ansible-runner is being addressed in #32020

Actions

Also available in: Atom PDF