--- - name: Include stunnel on condition ansible.builtin.include_tasks: file: stunnel.yml when: smtprelay_port not in [587] - name: Include SMTP remapping ansible.builtin.include_tasks: file: smtp_remap.yml when: smtprelay_origin not in ["mateu.be"] - name: Install packages ansible.builtin.package: name: - postfix - libsasl2-modules state: present - name: Put sasl_passwd configuration file ansible.builtin.template: src: sasl_passwd.j2 dest: /etc/postfix/sasl_passwd mode: "0o640" notify: - Postmap sasl_passwd - Restart postfix - name: Put postfix configuration file ansible.builtin.template: src: main.cf.j2 dest: /etc/postfix/main.cf mode: "0o644" notify: Restart postfix