mirror of
https://github.com/luzifer-ansible/simplefile.git
synced 2024-09-19 15:12:57 +00:00
Execute commands only when file has changed
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
2dbeaba57b
commit
79f9d05b1a
@ -29,9 +29,10 @@
|
||||
src: '{{ item.src | default(omit) }}'
|
||||
unsafe_writes: '{{ item.unsafe_writes | default(omit) }}'
|
||||
validate: '{{ item.validate | default(omit) }}'
|
||||
register: simplefile_write_file
|
||||
|
||||
- name: Execute post-command
|
||||
command: '{{ item.post_command }}'
|
||||
when: item.post_command is defined
|
||||
when: item.post_command is defined and simplefile_write_file.changed
|
||||
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user