Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-22053 Install Errata - Katello Ansible Default Remote Execution Fails ( Syntax Error While Loading Yaml )
  3. SAT-22468

[DOC] [Regression] Install Errata - Katello Ansible Default Remote Execution Fails ( Syntax Error While Loading Yaml )

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • None
    • None
    • Hosts - Content
    • Sprint 127, Sprint 128, Sprint 129, Sprint 130, Sprint 131, Sprint 132

      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:
      
      ~~~
         1:
      ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
         2:
      JSON: Expecting value: line 1 column 5 (char 4)
         3:
      Syntax Error while loading YAML.
         4:
        mapping values are not allowed in this context
         5:
      The error appears to be in '/tmp/d20231219-112896-1iychip/project/playbook.yml': line 2, column 8, but may
         6:
      be elsewhere in the file depending on the exact syntax problem.
         7:
      The offending line appears to be:
         8:
          ---
         9:
      - hosts: all
        10:
             ^ here
        11:
      Exit status: 4
        12:
      StandardError: Job execution failed
      ~~~
      
      Further, the actual playbook generated on the Ansible working directory of the Satellite looks like this:
      
      ~~~
          ---
      - hosts: all
        tasks:
          - 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:
      always
      
      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.

      DOC Tracker for https://issues.redhat.com/browse/SAT-22053
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2255329

              bangelic@redhat.com Brian Angelica
              satellite-focaccia-bot Focaccia Bot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: