--- - name: Install postfix and libsas to do mail relay action: apt pkg={{ item }} state=present with_items: - postfix - libsasl2-2 tags: - postfix-relay - name: Write the postfix main configuration file template: src=main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root mode=0444 notify: Restart postfix tags: - postfix-relay - name: Activate the submission port on the postfix master file template: src=postfix-master.cf.j2 dest=/etc/postfix/master.cf owner=root group=root mode=0444 notify: Restart postfix tags: - postfix-relay