Take darkened hosts out of the playbook rotation, fix error handling in template
module so that if a directory path is specified we get valid output
This commit is contained in:
parent
79d91e024b
commit
de1d0011bc
2 changed files with 8 additions and 1 deletions
|
@ -111,7 +111,7 @@ class PlayBook(object):
|
||||||
# do not continue to run tasks on hosts that have had failures
|
# do not continue to run tasks on hosts that have had failures
|
||||||
new_hosts = []
|
new_hosts = []
|
||||||
for x in host_list:
|
for x in host_list:
|
||||||
if not self.failures.has_key(x):
|
if not self.failures.has_key(x) and not self.dark.has_key(x):
|
||||||
new_hosts.append(x)
|
new_hosts.append(x)
|
||||||
host_list = new_hosts
|
host_list = new_hosts
|
||||||
|
|
||||||
|
|
7
library/template
Normal file → Executable file
7
library/template
Normal file → Executable file
|
@ -72,6 +72,13 @@ if not os.path.exists(source):
|
||||||
|
|
||||||
source = file(source).read()
|
source = file(source).read()
|
||||||
|
|
||||||
|
if os.path.isdir(dest):
|
||||||
|
print json.dumps({
|
||||||
|
"failed" : 1,
|
||||||
|
"msg" : "Destination is a directory"
|
||||||
|
})
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# record md5sum of original source file so we can report if it changed
|
# record md5sum of original source file so we can report if it changed
|
||||||
changed = False
|
changed = False
|
||||||
md5sum = None
|
md5sum = None
|
||||||
|
|
Loading…
Reference in a new issue