smtp.yml 581 B

12345678910111213141516171819
  1. - name: Install postfix packages
  2. apt: pkg={{ item }} install_recommends=no state=installed update_cache=yes
  3. with_items:
  4. - postfix
  5. - ca-certificates
  6. - procmail
  7. when: with_postfix
  8. - name: Install mail aliases file
  9. template: src=aliases.j2 dest=/etc/aliases owner=root group=root mode=0644
  10. notify:
  11. - Regenerate aliases cache
  12. when: with_postfix or with_mail_aliases
  13. - name: Install postfix main configuration
  14. template: src=postfix/main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root mode=0644
  15. notify:
  16. - Restart postfix
  17. when: with_postfix