New "staging-friendly" group to be exempted from staging firewall ban.

This commit is contained in:
Ralph Bean
2014-10-13 18:22:24 +00:00
parent 091df8471d
commit 2e60797ef4
2 changed files with 10 additions and 1 deletions

View File

@@ -31,7 +31,7 @@
-A INPUT -p tcp -m tcp --dport 5666 -s 10.5.126.41 -j ACCEPT
# ban staging from non-staging hosts
{% if env != 'staging' %}
{% if env != 'staging' and inventory_hostname not in groups['staging-friendly'] %}
{% for host in groups['staging'] %}
{% if 'eth0_ip' in hostvars[host] %}# {{ host }}
-A INPUT -s {{ hostvars[host]['eth0_ip'] }} -j REJECT --reject-with icmp-host-prohibited