check certificate already exists
This commit is contained in:
parent
7fd6806a31
commit
a64199b9fb
1 changed files with 8 additions and 1 deletions
|
@ -15,9 +15,16 @@
|
||||||
- name: Ensure configuration of dbmail
|
- name: Ensure configuration of dbmail
|
||||||
include_tasks: configure_dbmail.yml
|
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
|
- name: Ensure certificates are configured
|
||||||
include_tasks: configure_certificates.yml
|
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
|
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
|
- name: Ensure user's are configured in dbmail
|
||||||
include_tasks: configure_dbmail_users.yml
|
include_tasks: configure_dbmail_users.yml
|
||||||
|
|
Loading…
Reference in a new issue