fix: Remove duplicate rules

This commit is contained in:
pulsar89.5 2024-05-06 22:49:54 +02:00
parent 2bfaf07125
commit 128fe14959

View File

@ -3,7 +3,7 @@
- name: Construire la liste des règles
ansible.builtin.set_fact:
nftables_rules: "{{ nftables_rules + specific }}"
nftables_rules: "{{ (nftables_rules + specific) | unique }}"
when: specific | length > 0
loop: "{{ lookup('ansible.builtin.varnames', '^nftables_rules_.+', wantlist=True) }}"
vars:
@ -11,7 +11,7 @@
- name: Construire la liste des tables
ansible.builtin.set_fact:
nftables_tables: "{{ nftables_tables + specific }}"
nftables_tables: "{{ (nftables_tables + specific) | unique }}"
when: specific | length > 0
loop: "{{ lookup('ansible.builtin.varnames', '^nftables_tables_.+', wantlist=True) }}"
vars: