summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2014-12-08 13:08:26 -0800
committerJames Cammarata <jimi@sngx.net>2015-02-17 13:34:45 -0600
commit573dbe177510cc31f7ae86f33db839524feb87a3 (patch)
tree58040dd5785c49bf6c96fe545ab4bdd5bb5bf128
parent53a94a1fde5399bb1fc8add377dbde1808abdc9d (diff)
downloadansible-573dbe177510cc31f7ae86f33db839524feb87a3.tar.gz
file does not exist is not an error when checksumming for the template modules
-rw-r--r--lib/ansible/runner/action_plugins/template.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/runner/action_plugins/template.py b/lib/ansible/runner/action_plugins/template.py
index 15e8e3a9a0..11c02796e3 100644
--- a/lib/ansible/runner/action_plugins/template.py
+++ b/lib/ansible/runner/action_plugins/template.py
@@ -92,7 +92,9 @@ class ActionModule(object):
local_checksum = utils.checksum_s(resultant)
remote_checksum = self.runner._remote_checksum(conn, tmp, dest, inject)
- if remote_checksum in ('0', '1', '2', '3', '4'):
+ if remote_checksum in ('0', '2', '3', '4'):
+ # Note: 1 means the file is not present which is fine; template
+ # will create it
result = dict(failed=True, msg="failed to checksum remote file."
" Checksum error code: %s" % remote_checksum)
return ReturnData(conn=conn, comm_ok=True, result=result)