2016-06-21 19:58:26 +02:00
|
|
|
---
|
2017-11-21 18:06:23 +01:00
|
|
|
- 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 postgresql and then restarts the service
|
|
|
|
copy: src=postgresql-letsencrypt-acme.sh dest={{ letsencrypt_acme_services_scripts_dir }}/postgresql owner=root group=root mode=4555
|
|
|
|
|
2016-06-21 19:58:26 +02:00
|
|
|
when:
|
|
|
|
- postgresql_letsencrypt_managed
|
|
|
|
- letsencrypt_acme_install
|
|
|
|
tags: [ 'postgresql', 'postgres', 'letsencrypt' ]
|
|
|
|
|
2017-11-21 18:06:23 +01:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Remove the letsencrypt certificate hook for postgresql
|
|
|
|
file: dest=/usr/lib/acme/hooks/postgresql state=absent
|
|
|
|
|
2016-06-21 19:58:26 +02:00
|
|
|
when:
|
2017-11-21 18:06:23 +01:00
|
|
|
- not postgresql_letsencrypt_managed
|
2016-06-21 19:58:26 +02:00
|
|
|
tags: [ 'postgresql', 'postgres', 'letsencrypt' ]
|