mirror of
https://github.com/luzifer-ansible/simplefile.git
synced 2024-12-22 17:51:17 +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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue