traefik: Adjust command formatting to satisfy ansible-lint

This commit is contained in:
saibotk 2020-09-26 22:37:09 +02:00
parent 36dd922f38
commit ada2133fd9
No known key found for this signature in database
GPG key ID: A3299C587D5DF523

View file

@ -146,7 +146,23 @@
# NOTE: This rule does not care about new / old ip values, so removal must be made by hand!
- name: Configure firewalld to allow IPv6 traffic for HTTP/HTTPS
command: "firewall-cmd --direct --add-rule ipv6 filter FORWARD 0 -p tcp --destination {{ traefik_ipv6.ip_addr | ipaddr('address') }}/128 --dport {{ item }} -j ACCEPT"
command:
argv:
- firewall-cmd
- --direct
- --add-rule
- ipv6
- filter
- FORWARD
- 0
- -p
- tcp
- --destination
- "{{ traefik_ipv6.ip_addr | ipaddr('address') }}/128"
- --dport
- "{{ item }}"
- -j
- ACCEPT
register: firewalld_direct_result
become: true
changed_when: '"ALREADY_ENABLED" not in firewalld_direct_result.stderr'
@ -162,7 +178,24 @@
# NOTE: This rule does not care about new / old ip values, so removal must be made by hand!
- name: Configure firewalld to allow IPv6 traffic for HTTP/HTTPS
command: "firewall-cmd --permanent --direct --add-rule ipv6 filter FORWARD 0 -p tcp --destination {{ traefik_ipv6.ip_addr | ipaddr('address') }}/128 --dport {{ item }} -j ACCEPT"
command:
argv:
- firewall-cmd
- --permanent
- --direct
- --add-rule
- ipv6
- filter
- FORWARD
- 0
- -p
- tcp
- --destination
- "{{ traefik_ipv6.ip_addr | ipaddr('address') }}/128"
- --dport
- "{{ item }}"
- -j
- ACCEPT
register: firewalld_direct_permanent_result
become: true
changed_when: '"ALREADY_ENABLED" not in firewalld_direct_permanent_result.stderr'