fix nginx iptables

This commit is contained in:
Robert Kaussow 2019-06-30 13:52:11 +02:00
parent 1300866c5f
commit 88ce30115f

View File

@ -40,11 +40,8 @@
- name: Open ports in iptables
iptables_raw:
name: allow_matrix_nginx_proxy
state: present
state: "{{ 'present' if matrix_nginx_iptables_enabled else 'absent' }}"
rules: '-A OUTPUT -m state --state NEW -p tcp -d {{ matrix_nginx_proxy_ip }} --dport {{ matrix_nginx_proxy_port }} -j ACCEPT'
when:
- matrix_nginx_iptables_enabled | bool
- (not matrix_nginx_server == inventory_hostname or not matrix_nginx_server == "localhost")
delegate_to: "{{ matrix_nginx_server }}"
become: True
become_user: root