Apply patch files using the GNU patch tool.

Options

namedescriptionrequiredchoices
basedir Path of a base directory in which the patch file will be applied. May be ommitted when C(dest) option is specified, otherwise required.
dest
  • Path of the file on the remote machine to be patched.
  • The names of the files to be patched are usually taken from the patch file, but if there's just one file to be patched it can specified with this option.
src Path of the patch file as accepted by the GNU patch tool. If C(remote_src) is False, the patch source file is looked up from the module's "files" directory. true
remote_src 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.
  • True
  • False
strip Number that indicates the smallest prefix containing leading slashes that will be stripped from each file name found in the patch file. For more information see the strip parameter of the GNU patch tool.
backup passes --backup --version-control=numbered to patch, producing numbered backup copies
binary Setting to true will disable patch's heuristic for transforming CRLF line endings into LF. Line endings of src and dest must match. If set to False, patch will replace CRLF in src files on POSIX.

Author

Jakub Jirutka (@jirutka) ,Luis Alberto Perez Lazaro (@luisperlaz)