diff --git a/releasenotes/notes/honor_trash_output_when_not_using_queue-f7c5a3051f5b90cc.yaml b/releasenotes/notes/honor_trash_output_when_not_using_queue-f7c5a3051f5b90cc.yaml new file mode 100644 index 000000000..2e1007862 --- /dev/null +++ b/releasenotes/notes/honor_trash_output_when_not_using_queue-f7c5a3051f5b90cc.yaml @@ -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. diff --git a/tripleo_common/actions/ansible.py b/tripleo_common/actions/ansible.py index 329240515..3e9d490c1 100644 --- a/tripleo_common/actions/ansible.py +++ b/tripleo_common/actions/ansible.py @@ -585,6 +585,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: