Bug 1810600
Summary: | [RFE] Ansible Role execution reports are not exactly human readable | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Jan Jansky <jjansky> |
Component: | Ansible - Configuration Management | Assignee: | satellite6-bugs <satellite6-bugs> |
Status: | CLOSED ERRATA | QA Contact: | Danny Synk <dsynk> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 6.6.0 | CC: | ahumbe, avroy, dsinglet, dsynk, egolov, ktordeur, ldixon, mkalyat, mmccune, nikhjain, pcreech, sigbjorn.lie, smallamp, zhunting |
Target Milestone: | 6.10.0 | Keywords: | FutureFeature, Patch |
Target Release: | Unused | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | ansible-collection-redhat-satellite-2.1.1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-16 14:09:07 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jan Jansky
2020-03-05 14:53:43 UTC
In this bug, we have to separate issue: 1. An RFE to present the logs in a different way. 2. A BZ -> reports do not show Ansible Icon so I'm splitting those two issues: I've created another issue for BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1825761 and I'm changing this one to be an RFE. Created redmine issue https://projects.theforeman.org/issues/29572 from this bug Regarding the N/A origin, the problem is in the foreman.py callback that is shipped in the latest Ansible release. In order to fix that, the foreman.py from the satellite ansible collection is required. The most straightforward way to fix that is this: wget https://raw.githubusercontent.com/RedHatSatellite/satellite-ansible-collection/develop/plugins/callback/foreman.py -O /usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.py I tested this with Ansible 2.9.16 and it fixes the problem. Once the report is correctly recognized as Ansible, the JSONs are parsed and you can interactively navigate through their structure. Longer term, it's planned to create a textual representation of these JSONs. Or actually better, install the RPM from Satellite repos and reconfigure Capsule to use this callback instead foreman-maintain packages unlock yum install ansible-collection-redhat-satellite foreman-maintain packages lock edit the /etc/foreman-proxy/ansible.cfg and change the line > callback_whitelist = foreman to > callback_whitelist = redhat.satellite.foreman The origin is then recognized (at least with 6.9 beta) and JSONs properly clickable. Upstream bug assigned to ymakias Upstream bug assigned to ymakias Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32189 has been resolved. Verified on Satellite 6.10, snap 20 (tfm-rubygem-foreman_ansible-6.3.4-1.el7sat.noarch). Steps to Test: 1. Register a RHEL host to Satellite 6.10. 2. Assign Ansible roles to the host. 3. On the Hosts > All Hosts > [hostname] page, select the "Run Ansible Roles" option. 4. When the job completes, navigate to Monitor > Config Management, and open the report for the job. Expected Results: The report is in a more readable format than the equivalent report on Satellite 6.9 and earlier, which presents the outcome of the job in a single line of unformatted JSON. Actual Results: The report table now has four columns (Level, Module, Arguments, and Message) in contrast to the old report's 3 columns (Level, Resource, and Message). The Arguments and Message column still display JSON, but each key/value pair is now separated by line breaks. Lists of keys can be expanded or collapsed. Keys are color coded blue, and different data types are color coded as well (my report shows string data in light green and boolean values in red). Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4702 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |