Open mprahl opened 7 years ago
Would be nice if the author adds an example
---
- name: Setup mail
hosts: mailserver.tld
become: true
vars:
mail_domain: vitexsoftware.com
mail_database: maildb
roles:
- role: geerlingguy.mysql
mysql_databases:
- name: '{{ mail_database }}'
encoding: utf8mb4
collation: utf8mb4_czech_ci
mysql_users:
- name: '{{ mail_database }}'
host: "localhost"
password: '{{ mail.db_password }}'
priv: "{{ mail_database }}.*:ALL"
- role: stackfocus.postfix-dovecot
postfix_dovecot_mysql_db_name: '{{ mail_database }}'
postfix_dovecot_mysql_user: '{{ mail_database }}'
postfix_dovecot_mysql_password: '{{ mail.db_password }}'
postfix_default_domain: '{{ mail_domain }}'
dovecot_protocols:
- imap
- pop3
- lmtp
dovecot_mail_privileged_group: vmail
dovecot_ssl_cert: /etc/letsencrypt/live/{{ mail_domain }}/fullchain.pem
dovecot_ssl_key: /etc/letsencrypt/live/{{ mail_domain }}/privkey.pem
postfix_ssl_cert: /etc/letsencrypt/live/{{ mail_domain }}/fullchain.pem
postfix_ssl_key: /etc/letsencrypt/live/{{ mail_domain }}/privkey.pem
postfix_smtp_tls_security_level: 'dane'
postfix_mydestination: 'vitexsoftware.com'
postfix_myhostname: 'mail.vitexsoftware.com'
My Working playbook
--- - name: Setup mail hosts: mailserver.tld become: true vars: mail_domain: vitexsoftware.com mail_database: maildb roles: - role: geerlingguy.mysql mysql_databases: - name: '{{ mail_database }}' encoding: utf8mb4 collation: utf8mb4_czech_ci mysql_users: - name: '{{ mail_database }}' host: "localhost" password: '{{ mail.db_password }}' priv: "{{ mail_database }}.*:ALL" - role: stackfocus.postfix-dovecot postfix_dovecot_mysql_db_name: '{{ mail_database }}' postfix_dovecot_mysql_user: '{{ mail_database }}' postfix_dovecot_mysql_password: '{{ mail.db_password }}' postfix_default_domain: '{{ mail_domain }}' dovecot_protocols: - imap - pop3 - lmtp dovecot_mail_privileged_group: vmail dovecot_ssl_cert: /etc/letsencrypt/live/{{ mail_domain }}/fullchain.pem dovecot_ssl_key: /etc/letsencrypt/live/{{ mail_domain }}/privkey.pem postfix_ssl_cert: /etc/letsencrypt/live/{{ mail_domain }}/fullchain.pem postfix_ssl_key: /etc/letsencrypt/live/{{ mail_domain }}/privkey.pem postfix_smtp_tls_security_level: 'dane' postfix_mydestination: 'vitexsoftware.com' postfix_myhostname: 'mail.vitexsoftware.com'
Could you please file a PR to include an example such as this?
An example playbook should be provided in README.md to get a deployment of Dovecot and Postfix.