--- - name: Perform a dist-upgrade. ansible.builtin.apt: upgrade: dist update_cache: yes - name: Set mailname template: src: templates/mailname dest: /etc/mailname - name: Install postfix package: name: - postfix - mailutils state: present - name: Copy the main config file template: src: templates/main.cf dest: /etc/postfix/main.cf notify: Reload postfix - name: Copy the header check file template: src: templates/header_check dest: /etc/postfix/header_check notify: Reload postfix - name: Copy the sender canonical file template: src: templates/sender_canonical dest: /etc/postfix/sender_canonical notify: Reload postfix