fix variable used in iptables loop

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-03-23 10:04:03 +01:00
parent 5a8a1f560a
commit 020d513461
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 5 additions and 3 deletions

View File

@ -30,16 +30,18 @@
- name: 'Enable ports for: {{ container_name }}'
iptables:
comment: '{{ container_name }} {{ item.protocol }}'
comment: '{{ container_name }} {{ rule.protocol }}'
action: insert
chain: DOCKER-USER
jump: ACCEPT
source: '0.0.0.0/0'
protocol: '{{ item.protocol }}'
destination_port: '{{ item.por }}'
protocol: '{{ rule.protocol }}'
destination_port: '{{ rule.port }}'
with_items:
- { protocol: 'tcp', port: '{{ public_tcp_port }}' }
- { protocol: 'udp', port: '{{ public_udp_port }}' }
loop_control:
loop_var: rule
notify:
- Save iptables rules