diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2015-02-09 16:27:03 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-02-09 16:27:03 -0500 |
commit | 9ea179697d4b88daf25634488a8cbaedb80d8bc0 (patch) | |
tree | d41b913879c7de3824c6415ba3f3ef690cf35a81 /files | |
parent | d94d0ce70b5db5ecfafbc73bebc822c9e18734f3 (diff) | |
download | ansible-modules-extras-9ea179697d4b88daf25634488a8cbaedb80d8bc0.tar.gz |
added version to patch and remote_src to allow for controlling if src is on master or target
Diffstat (limited to 'files')
-rw-r--r-- | files/patch.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/files/patch.py b/files/patch.py index e2e5467f..46fefe86 100644 --- a/files/patch.py +++ b/files/patch.py @@ -23,7 +23,9 @@ DOCUMENTATION = ''' --- module: patch author: Luis Alberto Perez Lazaro, Jakub Jirutka -version_added: 1.8 +version_added: 1.9 +description: + - Apply patch files using the GNU patch tool. short_description: Apply patch files using the GNU patch tool. options: basedir: @@ -41,10 +43,16 @@ options: aliases: [ "originalfile" ] src: description: - - Path of the patch file on the remote machine as accepted by the GNU - patch tool. + - Path of the patch file as accepted by the GNU patch tool. required: true aliases: [ "patchfile" ] + remote_src: + description: + - If False, it will search for src at originating/master machine, if True it will + go to the remote/target machine for the src. Default is False. + choices: [ "True", "False" ] + required: false + default: "False" strip: description: - Number that indicates the smallest prefix containing leading slashes @@ -110,7 +118,8 @@ def main(): 'src': {'required': True, 'aliases': ['patchfile']}, 'dest': {'aliases': ['originalfile']}, 'basedir': {}, - 'strip': {'default': 0, 'type': 'int'} + 'strip': {'default': 0, 'type': 'int'}, + 'remote_src': {'default': False, 'type': 'bool'}, }, required_one_of=[['dest', 'basedir']], supports_check_mode=True |