Merge "Honor trash_output when not using queue" into stable/queens

This commit is contained in:
Zuul 2019-09-09 15:47:23 +00:00 committed by Gerrit Code Review
commit 609c1a8d7d
2 changed files with 9 additions and 0 deletions

View File

@ -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.

View File

@ -540,6 +540,9 @@ class AnsiblePlaybookAction(base.TripleOAction):
*command, cwd=self.work_dir, *command, cwd=self.work_dir,
env_variables=env_variables, env_variables=env_variables,
log_errors=processutils.LogErrors.ALL) log_errors=processutils.LogErrors.ALL)
if self.trash_output:
stdout = ""
stderr = ""
return {"stderr": stderr, "stdout": stdout, return {"stderr": stderr, "stdout": stdout,
"log_path": os.path.join(self.work_dir, 'ansible.log')} "log_path": os.path.join(self.work_dir, 'ansible.log')}
finally: finally: