mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Make sure patch command is found on remote system.
This commit is contained in:
committed by
Matt Clay
parent
bd0c787c37
commit
4e24d2cdf7
2
lib/ansible/modules/extras/files/patch.py
Normal file → Executable file
2
lib/ansible/modules/extras/files/patch.py
Normal file → Executable file
@@ -141,6 +141,8 @@ def main():
|
|||||||
p.basedir = path.dirname(p.dest)
|
p.basedir = path.dirname(p.dest)
|
||||||
|
|
||||||
patch_bin = module.get_bin_path('patch')
|
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)))
|
patch_func = lambda opts: module.run_command("%s %s" % (patch_bin, ' '.join(opts)))
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
|
|||||||
Reference in New Issue
Block a user