Bug 2116369 - Unable to enable callback plugin per-template
Summary: Unable to enable callback plugin per-template
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.14.0
Assignee: nalfassi
QA Contact: addubey
Zuzana Lena Ansorgova
URL:
Whiteboard:
: 2125391 2139448 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-08 12:02 UTC by Pablo Mendez Hernandez
Modified: 2023-07-21 13:41 UTC (History)
13 users (show)

Fixed In Version: rubygem-foreman_ansible-11.2.0
Doc Type: Bug Fix
Doc Text:
.Enable Ansible callback per job template Ansible callback allows hosts to send facts, which are used to create configuration reports, back to Satellite after a job finishes. You can now enable the callback for Ansible job templates per template. By default, the callback is enabled only for the original `Ansible Roles - Ansible Default` template and disabled for all the other original Ansible job templates. To enable the callback, create, clone, or edit an unlocked Ansible job template, navigate to the *Ansible* tab and select the *Enable Ansible Callback* checkbox.
Clone Of:
: 2211954 (view as bug list)
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35585 0 Normal Closed Unable to enable callback plugin per-template 2023-05-22 13:51:09 UTC
Red Hat Issue Tracker SAT-16866 0 None None None 2023-03-30 14:28:33 UTC
Red Hat Issue Tracker SAT-17930 0 None None None 2023-05-30 07:48:50 UTC
Red Hat Knowledge Base (Solution) 6983172 0 None None None 2022-11-17 11:40:14 UTC

Internal Links: 2077529

Description Pablo Mendez Hernandez 2022-08-08 12:02:45 UTC
Description of problem:

After the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1934110 went in (in 6.10), it's not possible to upload reports to Satellite for cloned roles.

The option to set a cloned role in "Administer -> Remote Execution Features -> ansible_run_host" is not valid since only one role (cloned or not) would have that
"ability", so it would be better to add a flag to every job template to enable it
(that way it could be inherited or not when cloned).


Version-Release number of selected component (if applicable):


How reproducible:

Always


Steps to Reproduce:
1. Clone: "Ansible Roles - Ansible Default" template [1]
2. Run: the new template
3. "WARNING: Callback disabled by environment. Disabling the Foreman callback plugin"


Actual results:

Foreman callback plugin is not enabled and report is not uploaded to Satellite.


Expected results:

Foreman callback plugin is enabled if set and report is uploaded to Satellite.


Additional info:

Comment 2 Ron Lavi 2022-09-14 13:44:12 UTC
*** Bug 2125391 has been marked as a duplicate of this bug. ***

Comment 3 nalfassi 2022-10-02 12:09:39 UTC
Created redmine issue https://projects.theforeman.org/issues/35585 from this bug

Comment 4 Bryan Kearney 2023-01-04 16:03:11 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35585 has been resolved.

Comment 5 nalfassi 2023-01-17 15:05:34 UTC
Details about the fix: 

A new option to enable the callback plugin for each template was added.

In the UI menu under Hosts -> Job Templates:
When you create a new job-template/edit an existing job-template - if the `Provider Type` (located in the `job` tab) is set to `Ansible`, a new `Ansible` tab should be displayed, with the new `Enable Ansible Callback` option. 
When the checkbox is checked - the callback is enabled for this job-template, and when the checkbox is unchecked - the callback is disabled. 

Note: If the job-template is locked, you won’t be able to edit the `Enable Ansible Callback` option.  

Hammer-cli update: 
When running the command `hammer job-template info –id=<tempalte_id>`, there should be a new boolean property: `Ansible Callback Enabled`. If the job-template’s provider is not set to `Ansible` - the new field won’t be displayed. 
You should also be able to use the `--ansible-callback-enabled` option when creating/updating job-templates. 

API update:
The new `ansible_callback_enabled` field should be included in the response of GET requests to show template details: `GET /api/job_templates/:id`.
You should also be able to send the `ansible_callback_enabled` parameter when creating/editing job-templates through an API call. 

Let me know if you need more information.

Comment 7 nalfassi 2023-03-06 09:22:02 UTC
*** Bug 2139448 has been marked as a duplicate of this bug. ***


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