Skip to content
Snippets Groups Projects
Commit 90a0a2df authored by ale's avatar ale
Browse files

base: Use stable sorting in firewall templates

parent 97ba3407
No related branches found
No related tags found
No related merge requests found
......@@ -4,10 +4,10 @@
create_chain allow-cluster
{% for host in groups['all']|sort %}
# {{ host }}
{% for addr in hostvars[host]['ansible_all_ipv4_addresses'] %}
{% for addr in hostvars[host]['ansible_all_ipv4_addresses'] | sort %}
add_rule4 -A allow-cluster -s {{ addr }} -j ACCEPT
{% endfor %}
{% for addr in hostvars[host]['ansible_all_ipv6_addresses'] %}
{% for addr in hostvars[host]['ansible_all_ipv6_addresses'] | sort %}
{% if not addr.startswith('fe80::') %}
add_rule6 -A allow-cluster -s {{ addr }} -j ACCEPT
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment