# HG changeset patch # User Luke Hoersten # Date 1748566889 18000 # Node ID e7083ad5c365e5bd4c8e9c251aaf80d5d4f8f8de # Parent a176be2cd1b336079f0cb4b24134eed11645d3bc Fixed an error with overwriting certbot certs. diff -r a176be2cd1b3 -r e7083ad5c365 certbot-dns-cloudflare/tasks/main.yaml --- a/certbot-dns-cloudflare/tasks/main.yaml Wed May 28 19:24:44 2025 -0500 +++ b/certbot-dns-cloudflare/tasks/main.yaml Thu May 29 20:01:29 2025 -0500 @@ -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 -r a176be2cd1b3 -r e7083ad5c365 prosody/files/prosody.sh --- a/prosody/files/prosody.sh Wed May 28 19:24:44 2025 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -#! /bin/bash - -prosodyctl --root cert import nth.io /etc/letsencrypt/live/nth.io-0001/fullchain.pem diff -r a176be2cd1b3 -r e7083ad5c365 prosody/tasks/main.yaml --- a/prosody/tasks/main.yaml Wed May 28 19:24:44 2025 -0500 +++ b/prosody/tasks/main.yaml Thu May 29 20:01:29 2025 -0500 @@ -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 -r a176be2cd1b3 -r e7083ad5c365 prosody/templates/prosody.sh.j2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prosody/templates/prosody.sh.j2 Thu May 29 20:01:29 2025 -0500 @@ -0,0 +1,3 @@ +#! /bin/bash + +prosodyctl --root cert import {{prosody_vhost}} /etc/letsencrypt/live/{{prosody_vhost}}/fullchain.pem