Skip to content
Snippets Groups Projects
Commit 163a8a79 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Delete unconfigured acmetool certificates

parent c4b6160f
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,29 @@
- acmetool
- certificates
- name: get activated certificates
find:
paths: /var/lib/acme/desired
pattern: "*"
file_type: file
register: active_certificates
tags:
- acmetool
- certificates
- name: deactivate unconfigured certificates
file:
path: "/var/lib/acme/desired/{{item}}"
state: absent
loop: "{{active_certificates.files|map(attribute='path')|map('basename')|difference(acmetool_certificates|map(attribute='hostnames')|map('first'))|list}}"
loop_control:
label: "{{item}}"
notify:
- update certificates
tags:
- acmetool
- certificates
- name: test if the desired certificates are present
stat:
path: "/var/lib/acme/live/{{item.hostnames[0]}}"
......
......@@ -74,7 +74,7 @@
- webservices
- pam
- name: "ensure the pam login for group {{pam_group}} is configured"
- name: "ensure the pam login is configured"
template:
src: nginx-pam.conf
dest: /etc/pam.d/nginx-{{pam_group}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment