From 90a0a2dfba771d6a8093c4aa816f317d87741339 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Wed, 17 Mar 2021 09:22:17 +0000
Subject: [PATCH] base: Use stable sorting in firewall templates

---
 roles/base/templates/firewall/03allow-cluster | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/base/templates/firewall/03allow-cluster b/roles/base/templates/firewall/03allow-cluster
index 8277aae..153fd52 100644
--- a/roles/base/templates/firewall/03allow-cluster
+++ b/roles/base/templates/firewall/03allow-cluster
@@ -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 %}
-- 
GitLab