22 lines
629 B
YAML
22 lines
629 B
YAML
---
|
|
# tasks file for iptables-ipfs
|
|
|
|
- ansible.builtin.debug:
|
|
msg: "ENABLED = {{ ipfs_enabled }}; iptables-ipfs role"
|
|
|
|
- when:
|
|
- "is_docker is not true"
|
|
block:
|
|
- name: allow/ disallow established packets on TCP/UDP port 4001 (IPFS)
|
|
ansible.builtin.iptables:
|
|
chain: INPUT
|
|
protocol: tcp
|
|
state: "{{ 'present' if ipfs_enabled is true else 'absent' }}"
|
|
destination_port: "{{ ipfs_port }}"
|
|
ctstate: NEW,ESTABLISHED
|
|
jump: ACCEPT
|
|
comment: IPFS dedicated port
|
|
|
|
- name: iptables-persistent
|
|
ansible.builtin.include_role:
|
|
name: iptables-persistent
|