# SPDX-License-Identifier: MIT
---
- name: Ensure the postfix ports status with the firewall role
  include_role:
    name: fedora.linux_system_roles.firewall
  vars:
    firewall:
      - {'service': 'smtp', 'state': 'enabled'}
      - {'service': 'smtps', 'state': 'enabled'}
      - {'service': 'smtp-submission', 'state': 'enabled'}
  when:
    - postfix_manage_firewall | bool
    - ansible_facts['os_family'] == 'RedHat'
    - ansible_facts['distribution_version'] is version('7', '>=')
