mirror of
https://github.com/luzifer-ansible/simplefile.git
synced 2024-11-08 13:50:03 +00:00
Support file removal
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
ec061b1f92
commit
070080dd86
1 changed files with 7 additions and 0 deletions
|
@ -34,6 +34,13 @@
|
|||
unsafe_writes: '{{ item.unsafe_writes | default(omit) }}'
|
||||
validate: '{{ item.validate | default(omit) }}'
|
||||
register: simplefile_write_file
|
||||
when: item.state is not defined or item.state != 'absent'
|
||||
|
||||
- name: Remove file
|
||||
file:
|
||||
dest: '{{ item.dest }}'
|
||||
state: 'absent'
|
||||
when: item.state is defined and item.state == 'absent'
|
||||
|
||||
- name: Execute post-command
|
||||
command: '{{ item.post_command }}'
|
||||
|
|
Loading…
Reference in a new issue