From 4e24d2cdf724f3ba72e9da6e7b403d7603b144fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gross?= Date: Fri, 20 Mar 2015 17:17:16 +0100 Subject: [PATCH] Make sure patch command is found on remote system. --- lib/ansible/modules/extras/files/patch.py | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 lib/ansible/modules/extras/files/patch.py diff --git a/lib/ansible/modules/extras/files/patch.py b/lib/ansible/modules/extras/files/patch.py old mode 100644 new mode 100755 index cd4b313007..314a1bc37d --- a/lib/ansible/modules/extras/files/patch.py +++ b/lib/ansible/modules/extras/files/patch.py @@ -141,6 +141,8 @@ def main(): p.basedir = path.dirname(p.dest) patch_bin = module.get_bin_path('patch') + if patch_bin is None: + module.fail_json(msg="patch command not found") patch_func = lambda opts: module.run_command("%s %s" % (patch_bin, ' '.join(opts))) changed = False