mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 14:21:06 -07:00
Add unit tests for playbooks, and fix an error caught by one
This commit is contained in:
parent
9c5ec886a6
commit
45abe3c16b
4 changed files with 159 additions and 2 deletions
|
@ -83,6 +83,7 @@ class PlayBook(object):
|
|||
# playbook file can be passed in as a path or
|
||||
# as file contents (to support API usage)
|
||||
|
||||
print "DEBUG: playbook=%s" % playbook
|
||||
self.basedir = os.path.dirname(playbook)
|
||||
self.playbook = self._parse_playbook(playbook)
|
||||
|
||||
|
@ -471,7 +472,7 @@ class PlayBook(object):
|
|||
for (host, host_result) in contacted_hosts.iteritems():
|
||||
if 'failed' in host_result:
|
||||
self.callbacks.on_failed(host, host_result)
|
||||
self.failed[host] = 1
|
||||
self.failures[host] = 1
|
||||
|
||||
# now for each result, load into the setup cache so we can
|
||||
# let runner template out future commands
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue