working on cleanup and fixing a few format issues
- modifying how installs are done
This commit is contained in:
16
tasks/internal/remove_empty_dir.yml
Normal file
16
tasks/internal/remove_empty_dir.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Check if dir is empty
|
||||
ansible.builtin.find:
|
||||
paths:
|
||||
- "{{ dir }}"
|
||||
file_type: any
|
||||
hidden: true
|
||||
register: fd_empty
|
||||
|
||||
- name: Remove empty dir
|
||||
when:
|
||||
- fd_empty.matched|int == 0
|
||||
ansible.builtin.file:
|
||||
path: "{{ dir }}"
|
||||
state: absent
|
||||
Reference in New Issue
Block a user