You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
567 B
YAML
22 lines
567 B
YAML
- name: Handle removed group files
|
|
block:
|
|
- find:
|
|
paths: /etc/nftables/ansible-managed/
|
|
file_type: 'any'
|
|
excludes: '{% for item in combined_rules %}{{ item }},{{ item }}.nft,{% endfor %}'
|
|
depth: 1
|
|
register: removeFiles
|
|
|
|
- file:
|
|
path: "{{ fileItem.path }}"
|
|
state: absent
|
|
loop: "{{ removeFiles.files }}"
|
|
loop_control:
|
|
label: "{{ fileItem.path }}"
|
|
loop_var: fileItem
|
|
|
|
- name: Handle removed included files per group
|
|
include_tasks: ./remove-per-group.yml
|
|
with_items:
|
|
- "{{ combined_rules | list }}"
|