patch – Apply patch files using the GNU patch tool¶
Synopsis¶
Apply patch files using the GNU patch tool.
Parameters¶
Notes¶
Note
This module requires GNU patch utility to be installed on the remote host.
Examples¶
- name: Apply patch to one file
patch:
src: /tmp/index.html.patch
dest: /var/www/index.html
- name: Apply patch to multiple files under basedir
patch:
src: /tmp/customize.patch
basedir: /var/www
strip: 1
- name: Revert patch to one file
patch:
src: /tmp/index.html.patch
dest: /var/www/index.html
state: absent
Status¶
This module is guaranteed to have backward compatible interface changes going forward. [stableinterface]
This module is maintained by the Ansible Community. [community]