fix url split
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-02-10 18:46:59 +01:00
parent f7bed9d50a
commit 2ba359e54b
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@
iptables_raw:
name: allow_cups
state: present
rules: 'A INPUT -m state --state NEW -p tcp --dport {{ cups_nginx_proxy_url | urlsplit("port") }} -j ACCEPT'
rules: '-A INPUT -m state --state NEW -p tcp --dport {{ cups_nginx_proxy_url.split(":")[1] }} -j ACCEPT'
when: cups_iptables_enabled
become: True
become_user: root

View File

@ -41,7 +41,7 @@
iptables_raw:
name: allow_cups_nginx_proxy
state: present
rules: '-A OUTPUT -m state --state NEW -p tcp -d {{ cups_nginx_proxy_url | urlsplit("hostname") }} --dport {{ cups_nginx_proxy_url | urlsplit("port") }} -j ACCEPT'
rules: '-A OUTPUT -m state --state NEW -p tcp -d {{ cups_nginx_proxy_url.split(":")[0] }} --dport {{ cups_nginx_proxy_url.split(":")[1] }} -j ACCEPT'
when: cups_nginx_iptables_enabled
delegate_to: "{{ cups_nginx_server }}"
become: True