pyinfra
pyinfra copied to clipboard
Add `files.patch` operation
Is your feature request related to a problem? Please describe
Some files, I need to change in various places, and its way easier to just diff original modified.
Describe the solution you'd like
I have done a script that patches the files and silently continue if they are already patched.
Could a new feature allow to apply a patch in a idempotent way and also pyinfra have information about it (for example, the "No changes" or the "Success" information)?
Example: A function .patch( name="Patch this configuration file", src="patches/example.patch", destination="/etc/example.conf" )
Thanks !