forked from ISTI-ansible-roles/ansible-roles
Run the hook script immediately after installing it to generate the pem file for the mongodb server.
This commit is contained in:
parent
44ac051834
commit
303cb3a1e5
|
@ -6,6 +6,9 @@
|
||||||
- name: Install a script that fix the letsencrypt certificate for mongodb and then reload the service
|
- name: Install a script that fix the letsencrypt certificate for mongodb and then reload the service
|
||||||
template: src=mongodb-letsencrypt-acmetool.sh dest={{ letsencrypt_acme_services_scripts_dir }}/mongodb owner=root group=root mode=4555
|
template: src=mongodb-letsencrypt-acmetool.sh dest={{ letsencrypt_acme_services_scripts_dir }}/mongodb owner=root group=root mode=4555
|
||||||
|
|
||||||
|
- name: Copy the certificate and its key where the mongo server expects it
|
||||||
|
command: "{{ letsencrypt_acme_services_scripts_dir }}/mongodb"
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- mongodb_ssl_letsencrypt_managed
|
- mongodb_ssl_letsencrypt_managed
|
||||||
- letsencrypt_acme_install
|
- letsencrypt_acme_install
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
LE_CERTS_DIR=/etc/letsencrypt/live/$HOSTNAME
|
LE_CERTS_DIR=/etc/letsencrypt/live/$HOSTNAME
|
||||||
LE_LOG_DIR=/var/log/letsencrypt
|
LE_LOG_DIR=/var/log/acme
|
||||||
MONGODB_CERTDIR=/etc/pki/mongodb
|
MONGODB_CERTDIR=/etc/pki/mongodb
|
||||||
MONGODB_CERTFILE=$MONGODB_CERTDIR/mongodb.pem
|
MONGODB_CERTFILE=$MONGODB_CERTDIR/mongodb.pem
|
||||||
DATE=$( date )
|
DATE=$( date )
|
||||||
|
|
Loading…
Reference in New Issue