try this logic for later
This commit is contained in:
parent
05e9125c67
commit
d951a6f19e
1 changed files with 4 additions and 0 deletions
|
@ -103,7 +103,11 @@
|
|||
{% if proxy_tcp_ports is defined %}
|
||||
{% for port in proxy_tcp_ports %}
|
||||
{% for proxy in (groups['proxies'] + groups['proxies_internal']) %}
|
||||
{% if hostvars[proxy]['datacenter'] == "phx2" and 'ansible_eth0' in hostvars[proxy] %}
|
||||
-A INPUT -p tcp -m tcp --dport {{ port }} --src {{ hostvars[proxy]['ansible_eth0']['ipv4']['address'] }} -j ACCEPT
|
||||
{% else %}
|
||||
-A INPUT -p tcp -m tcp --dport {{ port }} --src {{ hostvars[proxy]['ansible_tun0']['ipv4']['address'] }} -j ACCEPT
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
# nagios
|
||||
-A INPUT -p tcp -m tcp --dport {{ port }} --src 10.5.126.41 -j ACCEPT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue