Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738
  1. - name: Install Postfix and related packages
  2. apt: pkg={{ item }} state=installed
  3. with_items:
  4. - postfix
  5. - mysql-server
  6. - postfix-mysql
  7. - python-mysqldb
  8. - libsasl2-modules
  9. - sasl2-bin
  10. - postgrey
  11. - name: Create database user for mail server
  12. mysql_user: user={{ mail_mysql_username }} password={{ mail_mysql_password }} state=present priv="mailserver.*:ALL"
  13. notify: import mysql postfix
  14. - name: Create database for mail server
  15. mysql_db: name={{ mail_mysql_database }} state=present
  16. notify: import mysql postfix
  17. - name: Copy import.sql
  18. template: src=mailserver.sql.j2 dest=/etc/postfix/import.sql owner=root group=root mode=0600
  19. notify: import mysql postfix
  20. - name: Copy main.cf
  21. template: src=etc_postfix_main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root
  22. notify: restart postfix
  23. - name: Copy master.cf
  24. copy: src=etc_postfix_master.cf dest=/etc/postfix/master.cf owner=root group=root
  25. notify: restart postfix
  26. - name: Copy additional postfix configuration files
  27. template: src=etc_postfix_{{ item }}.j2 dest=/etc/postfix/{{ item }} owner=root group=root
  28. with_items:
  29. - mysql-virtual-mailbox-domains.cf
  30. - mysql-virtual-mailbox-maps.cf
  31. - mysql-virtual-alias-maps.cf
  32. notify: restart postfix