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 <kecarter@redhat.com>
This commit is contained in:
parent
f456ac9312
commit
d8e0c5389c
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user