Bug 2161410

Summary: Ansible jobs/roles alwasy return success on the webUI if there are too many lines being logged
Product: Red Hat Satellite Reporter: Joniel Pasqualetto <jpasqual>
Component: AnsibleAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.4CC: nalfassi
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Joniel Pasqualetto 2023-01-16 20:31:54 UTC
Description of problem:

Running a role or a job template that will print a LOT of messages (using the debug module, for example), the job always return success on the task status regardless of the actual return on the ansible execution.

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


How reproducible:
Always

Steps to Reproduce:
1. Create a job template with the following code, having a debug tasks printing all vars:

~~~
- hosts: all
  tasks:
    - name: Debug 
      debug:
        var: vars
        
    - name: Fail task
      fail:
        msg: "This task will always fail"
~~~

2. Run it against any host and note that it will return success.


Actual results:

If enough debug lines are printed, task will return success even if a later task fails.

Expected results:

Wait for all tasks to be executed and return the proper status.


Additional info:

Removing the debug task, the job behaves as expected and returns "fail"

~~~
- hosts: all
  tasks:       
    - name: Fail task
      fail:
        msg: "This task will always fail"
~~~

Same behavior was observed on Satellite 6.11 and 6.12.