From a1a6eae96ca639f456a3133761a3319012d8d46a Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 28 Feb 2012 02:32:14 -0500 Subject: [PATCH] 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 --- template | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 template diff --git a/template b/template old mode 100644 new mode 100755 index fd454df42e6..3850cb152cd --- a/template +++ b/template @@ -72,6 +72,13 @@ if not os.path.exists(source): 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 changed = False md5sum = None