fix variable used in iptables loop
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
5a8a1f560a
commit
020d513461
|
@ -30,16 +30,18 @@
|
||||||
|
|
||||||
- name: 'Enable ports for: {{ container_name }}'
|
- name: 'Enable ports for: {{ container_name }}'
|
||||||
iptables:
|
iptables:
|
||||||
comment: '{{ container_name }} {{ item.protocol }}'
|
comment: '{{ container_name }} {{ rule.protocol }}'
|
||||||
action: insert
|
action: insert
|
||||||
chain: DOCKER-USER
|
chain: DOCKER-USER
|
||||||
jump: ACCEPT
|
jump: ACCEPT
|
||||||
source: '0.0.0.0/0'
|
source: '0.0.0.0/0'
|
||||||
protocol: '{{ item.protocol }}'
|
protocol: '{{ rule.protocol }}'
|
||||||
destination_port: '{{ item.por }}'
|
destination_port: '{{ rule.port }}'
|
||||||
with_items:
|
with_items:
|
||||||
- { protocol: 'tcp', port: '{{ public_tcp_port }}' }
|
- { protocol: 'tcp', port: '{{ public_tcp_port }}' }
|
||||||
- { protocol: 'udp', port: '{{ public_udp_port }}' }
|
- { protocol: 'udp', port: '{{ public_udp_port }}' }
|
||||||
|
loop_control:
|
||||||
|
loop_var: rule
|
||||||
notify:
|
notify:
|
||||||
- Save iptables rules
|
- Save iptables rules
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue