ansible.posix.patch – Apply patch files using the GNU patch tool¶
Note
This plugin is part of the ansible.posix collection (version 1.1.1).
To install it use: ansible-galaxy collection install ansible.posix
.
To use it in a playbook, specify: ansible.posix.patch
.
New in version 1.0.0: of ansible.posix
Synopsis¶
Apply patch files using the GNU patch tool.
Note
This module has a corresponding action plugin.
Parameters¶
Examples¶
- name: Apply patch to one file
ansible.posix.patch:
src: /tmp/index.html.patch
dest: /var/www/index.html
- name: Apply patch to multiple files under basedir
ansible.posix.patch:
src: /tmp/customize.patch
basedir: /var/www
strip: 1
- name: Revert patch to one file
ansible.posix.patch:
src: /tmp/index.html.patch
dest: /var/www/index.html
state: absent
Authors¶
Jakub Jirutka (@jirutka)
Luis Alberto Perez Lazaro (@luisperlaz)