33 lines
1 KiB
YAML
33 lines
1 KiB
YAML
---
|
|
- name: Ensure configuration of UFW for dbmail
|
|
include_tasks: configure_ufw.yml
|
|
when: configure_ufw
|
|
|
|
- name: Ensure installation of software
|
|
include_tasks: install.yml
|
|
|
|
- name: Ensure configuration of MySQL database
|
|
include_tasks: configure_mysql_database.yml
|
|
when:
|
|
- dbmail_db_driver == 'mysql'
|
|
- "'127.0.0.' in dbmail_db_host or dbmail_db_host == 'localhost' or dbmail_db_host == ansible_host"
|
|
|
|
- name: Ensure configuration of dbmail
|
|
include_tasks: configure_dbmail.yml
|
|
|
|
- name: Get file certificate stats
|
|
stat:
|
|
path: "/etc/letsencrypt/live/{{ mail_server_fqdn }}"
|
|
register: cert_file
|
|
|
|
- name: Ensure certificates are configured
|
|
include_tasks: configure_certificates.yml
|
|
when:
|
|
- dbmail_configuration['POP']['tls_port'] > 0 or dbmail_configuration['IMAP']['tls_port'] > 0 or dbmail_configuration['SIEVE']['tls_port'] > 0
|
|
- not cert_file.stat.exists
|
|
|
|
- name: Ensure user's are configured in dbmail
|
|
include_tasks: configure_dbmail_users.yml
|
|
|
|
- name: Ensure postfix is configured for dbmail
|
|
include_tasks: configure_postfix.yml
|