ansible-roles/roles/wapt_server/tasks/iptables.yml

9 lines
323 B
YAML

---
- name: Handle ports
iptables_raw:
name: wapt_ports
state: "{{ (wapt_src_ip is defined and wapt_src_ip | length > 0) | ternary('present','absent') }}"
rules: "-A INPUT -m state --state NEW -p tcp -m multiport --dports {{ wapt_ports | join(',') }} -s {{ wapt_src_ip | join(',') }} -j ACCEPT"
tags: wapt