# SPDX-License-Identifier: MIT - name: 'Rebuild Postfix lookup tables' loop_control: loop_var: 'somta_postfix_postmap_handler' label: 'Rebuild ''/etc/postfix/{{ somta_postfix_postmap_handler.lookup_table_source_file }}'' lookup table' loop: - { lookup_table_source_file: 'sasl_passwd.j2' } - { lookup_table_source_file: 'sender_canonical_maps.j2' } - { lookup_table_source_file: 'smtp_header_checks' } ansible.builtin.shell: | postmap '/etc/postfix/{{ somta_postfix_postmap_handler.lookup_table_source_file }}' listen: 'Ensure that a Mail Transfer Agent is running with newest config' - name: 'Rebuild e-mail aliases lookup tables' ansible.builtin.shell: | newaliases listen: 'Ensure that a Mail Transfer Agent is running with newest config' - name: 'Restart postfix.service' ansible.builtin.service: name: 'postfix.service' state: 'restarted' enabled: true listen: 'Ensure that a Mail Transfer Agent is running with newest config'