diff options
| author | Luke Hoersten <[email protected]> | 2025-05-29 20:01:29 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2025-05-29 20:01:29 -0500 |
| commit | a6f6bf556cf28894ac21d41396397acbbda524d7 (patch) | |
| tree | 3a8905e9706b760c7286a134eac59cc8882f99ef | |
| parent | cb74bdc5ae5194ceeda48aa92ca26ca685c737f9 (diff) | |
Fixed an error with overwriting certbot certs.
| -rw-r--r-- | certbot-dns-cloudflare/tasks/main.yaml | 4 | ||||
| -rw-r--r-- | prosody/files/prosody.sh | 3 | ||||
| -rw-r--r-- | prosody/tasks/main.yaml | 4 | ||||
| -rw-r--r-- | prosody/templates/prosody.sh.j2 | 3 |
4 files changed, 7 insertions, 7 deletions
diff --git a/certbot-dns-cloudflare/tasks/main.yaml b/certbot-dns-cloudflare/tasks/main.yaml index 99b18cc..26ad91e 100644 --- a/certbot-dns-cloudflare/tasks/main.yaml +++ b/certbot-dns-cloudflare/tasks/main.yaml @@ -30,11 +30,11 @@ - name: check if cert exists become: yes - stat: path="/etc/letsencrypt/live/{{certbot_dns_cloudflare_domain}}-0001/cert.pem" + stat: path="/etc/letsencrypt/live/{{certbot_dns_cloudflare_domain}}/cert.pem" register: cert - name: run certbot become: yes - command: "certbot certonly -n --agree-tos --email {{certbot_dns_cloudflare_email}} --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/cred.conf -d {{certbot_dns_cloudflare_domain}} -d \"*.{{certbot_dns_cloudflare_domain}}\"" + command: "certbot certonly -n --agree-tos --email {{certbot_dns_cloudflare_email}} --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/cred.conf --cert-name {{certbot_dns_cloudflare_domain}} -d {{certbot_dns_cloudflare_domain}} -d \"*.{{certbot_dns_cloudflare_domain}}\"" when: not cert.stat.exists changed_when: false diff --git a/prosody/files/prosody.sh b/prosody/files/prosody.sh deleted file mode 100644 index e966ae8..0000000 --- a/prosody/files/prosody.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash - -prosodyctl --root cert import nth.io /etc/letsencrypt/live/nth.io-0001/fullchain.pem diff --git a/prosody/tasks/main.yaml b/prosody/tasks/main.yaml index 041dc35..752e4b0 100644 --- a/prosody/tasks/main.yaml +++ b/prosody/tasks/main.yaml @@ -22,8 +22,8 @@ - name: install letsencrypt ssl deploy hook become: yes - copy: - src: "prosody.sh" + template: + src: "prosody.sh.j2" dest: "/etc/letsencrypt/renewal-hooks/deploy/prosody.sh" mode: "0755" diff --git a/prosody/templates/prosody.sh.j2 b/prosody/templates/prosody.sh.j2 new file mode 100644 index 0000000..8bb7b96 --- /dev/null +++ b/prosody/templates/prosody.sh.j2 @@ -0,0 +1,3 @@ +#! /bin/bash + +prosodyctl --root cert import {{prosody_vhost}} /etc/letsencrypt/live/{{prosody_vhost}}/fullchain.pem |
