---

- name: Handle odoo ports
  iptables_raw:
    name: odoo_ports
    state: "{{ (odoo_src_ip | length > 0) | ternary('present','absent') }}"
    rules: "-A INPUT -m state --state NEW -p tcp -m multiport --dports {{ odoo_ports | join(',') }} -s {{ odoo_src_ip | join(',') }} -j ACCEPT"
  tags: firewall,odoo
