Merge pull request #431 from bradobro/fix_tasksafterfailure
Fix to make 0.5 hosts with failures not be included in future task executionspull/4420/head
commit
0eca3030f4
|
@ -89,9 +89,10 @@ class Inventory(object):
|
||||||
for host in group.get_hosts():
|
for host in group.get_hosts():
|
||||||
for pat in patterns:
|
for pat in patterns:
|
||||||
if group.name == pat or pat == 'all' or self._match(host.name, pat):
|
if group.name == pat or pat == 'all' or self._match(host.name, pat):
|
||||||
if not self._restriction:
|
#must test explicitly for None because [] means no hosts allowed
|
||||||
|
if self._restriction==None:
|
||||||
hosts[host.name] = host
|
hosts[host.name] = host
|
||||||
if self._restriction and host.name in self._restriction:
|
elif host.name in self._restriction:
|
||||||
hosts[host.name] = host
|
hosts[host.name] = host
|
||||||
return sorted(hosts.values(), key=lambda x: x.name)
|
return sorted(hosts.values(), key=lambda x: x.name)
|
||||||
|
|
||||||
|
|
|
@ -282,7 +282,6 @@ class PlayBook(object):
|
||||||
# now with that data, handle contentional variable file imports!
|
# now with that data, handle contentional variable file imports!
|
||||||
if play.vars_files and len(play.vars_files) > 0:
|
if play.vars_files and len(play.vars_files) > 0:
|
||||||
rc = self._do_setup_step(play, play.vars_files)
|
rc = self._do_setup_step(play, play.vars_files)
|
||||||
#else: warn "You have a vars_files section but didn't state any vars files??
|
|
||||||
|
|
||||||
# run all the top level tasks, these get run on every node
|
# run all the top level tasks, these get run on every node
|
||||||
for task in play.tasks():
|
for task in play.tasks():
|
||||||
|
|
Loading…
Reference in New Issue