diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/MSA/tasks/main.yml | 10 | ||||
-rw-r--r-- | roles/MSA/templates/etc/postfix/main.cf.j2 | 4 | ||||
-rw-r--r-- | roles/MX/tasks/main.yml | 10 | ||||
-rw-r--r-- | roles/MX/templates/etc/postfix/main.cf.j2 | 4 | ||||
-rw-r--r-- | roles/lacme/templates/etc/lacme/lacme-certs.conf.j2 | 8 |
5 files changed, 26 insertions, 10 deletions
diff --git a/roles/MSA/tasks/main.yml b/roles/MSA/tasks/main.yml index 1c34720..3068e1b 100644 --- a/roles/MSA/tasks/main.yml +++ b/roles/MSA/tasks/main.yml @@ -22,6 +22,14 @@ owner=root group=root mode=0644 +- name: Create directory /etc/postfix/ssl + file: path=/etc/postfix-{{ postfix_instance[inst].name }}/ssl + state=directory + owner=root group=root + mode=0755 + tags: + - genkey + - meta: flush_handlers - name: Start Postfix @@ -32,7 +40,7 @@ become: False # `/usr/sbin/postmulti -i msa -x /usr/sbin/postconf -xh smtpd_tls_cert_file` fetch_cmd: cmd="openssl x509 -noout -pubkey" - stdin=/etc/postfix/ssl/smtp.fripost.org.pem + stdin=/etc/postfix-{{ postfix_instance[inst].name }}/ssl/smtp.fripost.org.pem dest=certs/public/smtp.fripost.org.pub tags: - genkey diff --git a/roles/MSA/templates/etc/postfix/main.cf.j2 b/roles/MSA/templates/etc/postfix/main.cf.j2 index e998f39..838135a 100644 --- a/roles/MSA/templates/etc/postfix/main.cf.j2 +++ b/roles/MSA/templates/etc/postfix/main.cf.j2 @@ -76,8 +76,8 @@ smtpd_tls_security_level = encrypt smtpd_tls_ciphers = high smtpd_tls_protocols = !SSLv2, !SSLv3 smtpd_tls_exclude_ciphers = EXPORT, LOW, MEDIUM, aNULL, eNULL, DES, RC4, MD5 -smtpd_tls_cert_file = /etc/postfix/ssl/smtp.fripost.org.pem -smtpd_tls_key_file = /etc/postfix/ssl/smtp.fripost.org.key +smtpd_tls_cert_file = $config_directory/ssl/smtp.fripost.org.pem +smtpd_tls_key_file = $config_directory/ssl/smtp.fripost.org.key smtpd_tls_dh1024_param_file = /etc/ssl/dhparams.pem smtpd_tls_session_cache_database= smtpd_tls_received_header = yes diff --git a/roles/MX/tasks/main.yml b/roles/MX/tasks/main.yml index 1d08734..5f19d9f 100644 --- a/roles/MX/tasks/main.yml +++ b/roles/MX/tasks/main.yml @@ -76,6 +76,14 @@ owner=root group=root mode=0755 +- name: Create directory /etc/postfix/ssl + file: path=/etc/postfix-{{ postfix_instance[inst].name }}/ssl + state=directory + owner=root group=root + mode=0755 + tags: + - genkey + - meta: flush_handlers - name: Start Postfix @@ -86,7 +94,7 @@ become: False # `/usr/sbin/postmulti -i mx -x /usr/sbin/postconf -xh smtpd_tls_cert_file` fetch_cmd: cmd="openssl x509 -noout -pubkey" - stdin=/etc/postfix/ssl/mx.fripost.org.pem + stdin=/etc/postfix-{{ postfix_instance[inst].name }}/ssl/mx.fripost.org.pem dest=certs/public/mx{{ mxno | default('') }}.fripost.org.pub tags: - genkey diff --git a/roles/MX/templates/etc/postfix/main.cf.j2 b/roles/MX/templates/etc/postfix/main.cf.j2 index 0f7acae..a5caf46 100644 --- a/roles/MX/templates/etc/postfix/main.cf.j2 +++ b/roles/MX/templates/etc/postfix/main.cf.j2 @@ -91,8 +91,8 @@ smtp_tls_fingerprint_digest = sha256 smtpd_tls_security_level = may smtpd_tls_ciphers = medium smtpd_tls_protocols = !SSLv2, !SSLv3 -smtpd_tls_cert_file = /etc/postfix/ssl/mx.fripost.org.pem -smtpd_tls_key_file = /etc/postfix/ssl/mx.fripost.org.key +smtpd_tls_cert_file = $config_directory/ssl/mx.fripost.org.pem +smtpd_tls_key_file = $config_directory/ssl/mx.fripost.org.key smtpd_tls_dh1024_param_file = /etc/ssl/dhparams.pem smtpd_tls_CApath = /etc/ssl/certs/ smtpd_tls_session_cache_database= diff --git a/roles/lacme/templates/etc/lacme/lacme-certs.conf.j2 b/roles/lacme/templates/etc/lacme/lacme-certs.conf.j2 index ca3415a..393826f 100644 --- a/roles/lacme/templates/etc/lacme/lacme-certs.conf.j2 +++ b/roles/lacme/templates/etc/lacme/lacme-certs.conf.j2 @@ -12,16 +12,16 @@ notify = /bin/systemctl restart dovecot {% if 'MSA' in group_names %} [smtp] -certificate-key = /etc/postfix/ssl/smtp.fripost.org.key -certificate-chain = /etc/postfix/ssl/smtp.fripost.org.pem +certificate-key = /etc/postfix-{{ postfix_instance.MSA.name }}/ssl/smtp.fripost.org.key +certificate-chain = /etc/postfix-{{ postfix_instance.MSA.name }}/ssl/smtp.fripost.org.pem subject = /O=Fripost/CN=smtp.fripost.org notify = /bin/systemctl reload postfix {% endif %} {% if 'MX' in group_names %} [mx] -certificate-key = /etc/postfix/ssl/mx.fripost.org.key -certificate-chain = /etc/postfix/ssl/mx.fripost.org.pem +certificate-key = /etc/postfix-{{ postfix_instance.MX.name }}/ssl/mx.fripost.org.key +certificate-chain = /etc/postfix-{{ postfix_instance.MX.name }}/ssl/mx.fripost.org.pem subject = /O=Fripost/CN=mx{{ mxno }}.fripost.org notify = /bin/systemctl reload postfix {% endif %} |