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
a5499d8992
commit
a1a6eae96c
1 changed files with 7 additions and 0 deletions
7
template
Normal file → Executable file
7
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