Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira ( 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 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 "", 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 2255329 - Install Errata - Katello Ansible Default Remote Execution Fails ( Syntax Error While Loading Yaml )
Summary: Install Errata - Katello Ansible Default Remote Execution Fails ( Syntax Erro...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: 6.15.0
Assignee: Jeremy Lenz
QA Contact: visawant
Depends On:
TreeView+ depends on / blocked
Reported: 2023-12-20 06:58 UTC by myoder
Modified: 2024-04-23 17:16 UTC (History)
7 users (show)

Fixed In Version: rubygem-katello-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2024-04-23 17:16:29 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36994 0 Normal New Katello Ansible Errata job template starts with spaces before — breaking the template 2024-01-08 18:49:16 UTC
Red Hat Issue Tracker SAT-22053 0 None None None 2023-12-20 06:58:41 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:16:30 UTC

Description myoder 2023-12-20 06:58:04 UTC
Description of problem:

Using "Install Errata - Katello Ansible Default" to install errata on a content host is failing to generate a valid Ansible playbook.  The playbook generated has 4 spaces before the beginning "---" which makes invalidates the playbook as a yaml file.

The error from the template invocation screen shows:

ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: Expecting value: line 1 column 5 (char 4)
Syntax Error while loading YAML.
  mapping values are not allowed in this context
The error appears to be in '/tmp/d20231219-112896-1iychip/project/playbook.yml': line 2, column 8, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- hosts: all
       ^ here
Exit status: 4
StandardError: Job execution failed

Further, the actual playbook generated on the Ansible working directory of the Satellite looks like this:

- hosts: all
    - shell:
        cmd: |
          yum -y update-minimal --advisory=RHSA-2022:4867
      register: out
    - debug: var=out

This was working in Satellite 6.13, and is now broken in 6.14.

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

How reproducible:

Steps to Reproduce:
1. Navigate to "Hosts => Content Hosts"
2. Select checkbox next to a host (that has installable errata), and select "Manage Errata" from the "Select Action" drop down menu
3. Select 1 errata from the list, and select "via remote execution" from the "Install Selected" drop down menu.
4. Step 3 may trigger the Katello Errata Install via SSH, and not Ansible.  If so, instead of selecting "via remote execution", select "via remote execution - customize first".  Then select "Katello via Ansible" for the job category, and "Install Errata - Katello Ansible Default" for the job template.  Make sure to add errata if it gets removed (e.g. errata_id ^ (RHSA-2022:4867) ).

Actual results:
Remote Execution task fails

Expected results:
Remote Execution task succeeds, and tries to install errata on the host

Additional info:
As a work around, the "Install Errata - Katello Script Default" job template from the "Katello" job category still works.

Comment 1 Ian Ballou 2024-01-08 18:48:47 UTC
Changing component to Hosts - Content since the change will need to be made in Katello.

Comment 2 Bryan Kearney 2024-01-13 00:03:02 UTC
Upstream bug assigned to jlenz

Comment 3 Bryan Kearney 2024-01-13 00:03:06 UTC
Upstream bug assigned to jlenz

Comment 4 Bryan Kearney 2024-01-18 04:03:03 UTC
Moving this bug to POST for triage into Satellite since the upstream issue has been resolved.

Comment 10 errata-xmlrpc 2024-04-23 17:16:29 UTC
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 (Important: Satellite 6.15.0 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.

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