Lets sort staging hosts in iptables template too

This commit is contained in:
Kevin Fenzi
2015-12-09 18:00:12 +00:00
parent bf5dc0c192
commit 5e4bb96eb5

View File

@@ -32,7 +32,7 @@
# production we have marked 'staging-friendly' that we do allow staging to talk to for
# mostly read-only data they need.
#
{% for host in groups['staging'] %}
{% for host in groups['staging']|sort %}
{% if 'eth0_ip' in hostvars[host] %}# {{ host }}
-A INPUT -s {{ hostvars[host]['eth0_ip'] }} -j REJECT --reject-with icmp-host-prohibited
{% else %}# {{ host }} has no 'eth0_ip' listed