2020-06-03 19:53:13 +02: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
|
2020-07-30 14:14:39 +02:00
|
|
|
template: src=postgresql-letsencrypt-acme.sh.j2 dest={{ letsencrypt_acme_services_scripts_dir }}/postgresql owner=root group=root mode=4555
|
2020-06-03 19:53:13 +02:00
|
|
|
|
|
|
|
when:
|
|
|
|
- postgresql_letsencrypt_managed
|
|
|
|
- letsencrypt_acme_install
|
2020-12-04 12:12:50 +01:00
|
|
|
tags: [ 'postgresql', 'postgres', 'letsencrypt', 'pg_acme_hook' ]
|
2020-06-03 19:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Remove the letsencrypt certificate hook for postgresql
|
|
|
|
file: dest=/usr/lib/acme/hooks/postgresql state=absent
|
|
|
|
|
|
|
|
when:
|
|
|
|
- not postgresql_letsencrypt_managed
|
2020-12-04 12:12:50 +01:00
|
|
|
tags: [ 'postgresql', 'postgres', 'letsencrypt', 'pg_acme_hook' ]
|