From d8e0c5389c4369de2d7e4b4986f8ca75919a0663 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 27 Jan 2020 11:47:10 -0600 Subject: [PATCH] Fix ansible-runner when verbosity is > 0 This change updates the run_ansible_playbook method to ensure that we're not attempting to re-open the ansible runner stdout property when executing a task with a verbosity setting of > 0. When the property is read the tmp file has already been cleaned up resulting in stacktrace. There's no value in re-opening the property as stdout is already been presented to the user so the offending code has been deleted. Change-Id: I4ab300e8a2a70adb1f79334aee44fde31d2cfa70 Signed-off-by: Kevin Carter --- tripleoclient/utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index dfacabb2f..cd08540f1 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -489,9 +489,6 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None, runner = ansible_runner.Runner(config=runner_config) status, rc = runner.run() - if verbosity > 1: - status = runner.stdout - if rc == 0: LOG.info( 'Ansible execution success. playbook: {}'.format(