---

- name: Handle API ports
  iptables_raw:
    name: linctl_api_port
    state: "{{ (linctl_api_src_ip | length > 0) | ternary('present','absent') }}"
    rules: "-A INPUT -m state --state NEW -p tcp --dport {{ linctl_api_port }} -s {{ linctl_api_src_ip | join(',') }} -j ACCEPT"
  tags: firewall,drbd

