---

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