Vars for my defaults/main.yml
postfix_conf:
relayhost: 'smtp.mailgun.org:587'
smtp_tls_security_level: 'encrypt'
smtp_tls_note_starttls_offer: 'yes'
smtp_sasl_auth_enable: 'yes'
smtp_sasl_password_maps: "static:{{ mailgun_ssmtp_user }}:{{ mailgun_ssmtp_pass }}"
smtp_sasl_security_options: 'noanonymous'
and in my tasks/main.yml
- name: Setup Postfix to support Mailgun relay
import_role:
name: linux-system-roles.postfix
tags: [monitoring, mailgun]