Merge pull request #208 from theS1LV3R/master

Allow for certificates to be expanded to include new domains
This commit is contained in:
Jeff Geerling
2025-01-28 22:10:40 -06:00
committed by GitHub
3 changed files with 6 additions and 12 deletions
+2 -6
View File
@@ -1,9 +1,4 @@
---
- name: Check if certificate already exists.
stat:
path: /etc/letsencrypt/live/{{ cert_item.domains | first | replace('*.', '') }}/cert.pem
register: letsencrypt_cert
- name: Ensure pre and post hook folders exist.
file:
path: /etc/letsencrypt/renewal-hooks/{{ item }}
@@ -39,4 +34,5 @@
- name: Generate new certificate if one doesn't exist.
command: "{{ certbot_create_command }}"
when: not letsencrypt_cert.stat.exists
register: certbot_create
changed_when: "'no action taken' not in certbot_create.stdout"
+2 -6
View File
@@ -1,9 +1,4 @@
---
- name: Check if certificate already exists.
stat:
path: /etc/letsencrypt/live/{{ cert_item.domains | first }}/cert.pem
register: letsencrypt_cert
- name: Create webroot directory if it doesn't exist yet
file:
path: "{{ cert_item.webroot | default(certbot_webroot) }}"
@@ -11,4 +6,5 @@
- name: Generate new certificate if one doesn't exist.
command: "{{ certbot_create_command }}"
when: not letsencrypt_cert.stat.exists
register: certbot_create
changed_when: "'no action taken' not in certbot_create.stdout"