diff --git a/roles/base/templates/iptables/iptables b/roles/base/templates/iptables/iptables index 63aa1d2905..f67fa63353 100644 --- a/roles/base/templates/iptables/iptables +++ b/roles/base/templates/iptables/iptables @@ -34,7 +34,7 @@ {% if env != 'staging' %} {% for host in groups['staging'] %} {% if 'eth0_ip' in hostvars[host] %}# {{ host }} --A INPUT -s {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }} -j REJECT --reject-with icmp-host-prohibited +-A INPUT -s {{ hostvars[host]['eth0_ip'] }} -j REJECT --reject-with icmp-host-prohibited {% else %}# {{ host }} has no 'eth0_ip' listed {% endif %} {% endfor %}