feat: Merge rules and tables in one file
This commit is contained in:
parent
35d31eb752
commit
7b3b2ea318
@ -33,10 +33,10 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: u=rw,g=,o=
|
mode: u=rw,g=,o=
|
||||||
src: "{{ role_path }}/templates/rules.conf.j2"
|
src: "{{ role_path }}/templates/rules.conf.j2"
|
||||||
dest: "/srv/nftables/rules_{{ item.filename }}.conf"
|
dest: "/srv/nftables/rules.conf"
|
||||||
loop: "{{ nftables_rules }}"
|
# loop: "{{ nftables_rules }}"
|
||||||
loop_control:
|
# loop_control:
|
||||||
label: "{{ item.filename }}"
|
# label: "{{ item.filename }}"
|
||||||
become: true
|
become: true
|
||||||
notify: Redémarrer nftables.service
|
notify: Redémarrer nftables.service
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% for rule in item.rules %}
|
{% for item in nftables_rules %}
|
||||||
{{ rule }}
|
# BEGIN {{ item.name }}
|
||||||
|
{{ item.rules | join('\n') }}
|
||||||
|
# END {{ item.name }}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user