configurations-ansible/roles/iptables-ipfs/tasks/main.yml

23 lines
629 B
YAML
Raw Normal View History

---
# 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' }}"
2022-11-21 16:52:36 +01:00
destination_port: "{{ ipfs_port }}"
ctstate: NEW,ESTABLISHED
jump: ACCEPT
comment: IPFS dedicated port
- name: iptables-persistent
ansible.builtin.include_role:
name: iptables-persistent