ansible-roles/mongodb-org/tasks/mongodb-letsencrypt-acmetoo...

16 lines
704 B
YAML
Raw Normal View History

---
- block:
- name: Create the acme hooks directory if it does not yet exist
file: dest={{ letsencrypt_acme_services_scripts_dir }} state=directory owner=root group=root
- 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
- name: Copy the certificate and its key where the mongo server expects it
command: "{{ letsencrypt_acme_services_scripts_dir }}/mongodb"
when:
- mongodb_ssl_letsencrypt_managed
- letsencrypt_acme_install
tags: [ 'mongodb', 'letsencrypt', 'mongodb_letsencrypt' ]