Switch success to false if a post playbook fails

We already have sucess false if pre playbooks fail. We only don't set it
for post playbooks.

Change-Id: I2d6071bf9d07a2695c81017d570ad4697801499f
Monty Taylor 2017-10-12 16:12:44 -05:00
parent 97081c8389
commit 0b1b95cbf2
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 1 additions and 0 deletions

View File

@ -1225,6 +1225,7 @@ class AnsibleJob(object):
post_status, post_code = self.runAnsiblePlaybook(
playbook, args['timeout'], success, phase='post', index=index)
if post_status != self.RESULT_NORMAL or post_code != 0:
success = False
# If we encountered a pre-failure, that takes
# precedence over the post result.
if not pre_failed: