Honor trash_output when not using queue
Previously, trash_output was not honored if a queue was not being used to post messages. This patch changes the behavior so that trash_output will be honored even if a queue is not being used, and all stdout/stderr will be discarded. Change-Id: I4fccfa0cb2a5382a52d63598f66dae446ff29c25 Closes-Bug: #1842102
This commit is contained in:
parent
23cd9c196f
commit
c7d44bc2ca
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- Previously, trash_output was not honored if a queue was not being used to
|
||||
post messages. The behavior has changed so that trash_output will be
|
||||
honored even if a queue is not being used, and all stdout/stderr will be
|
||||
discarded.
|
@ -640,6 +640,9 @@ class AnsiblePlaybookAction(base.TripleOAction):
|
||||
*command, cwd=self.work_dir,
|
||||
env_variables=env_variables,
|
||||
log_errors=processutils.LogErrors.ALL)
|
||||
if self.trash_output:
|
||||
stdout = ""
|
||||
stderr = ""
|
||||
return {"stderr": stderr, "stdout": stdout,
|
||||
"log_path": os.path.join(self.work_dir, 'ansible.log')}
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user