12 lines
328 B
YAML
12 lines
328 B
YAML
|
- name: Find caddy site configs, but exclude managed sites
|
||
|
ansible.builtin.find:
|
||
|
paths: "{{ caddy_config_path }}"
|
||
|
excludes: "{{ managed_sites | default([]) }}"
|
||
|
register: files_to_delete
|
||
|
|
||
|
- name: Remove unmanaged sites
|
||
|
file:
|
||
|
path: "{{ item.path }}"
|
||
|
state: absent
|
||
|
with_items: "{{ files_to_delete.files }}"
|