diff options
| author | Luke Hoersten <[email protected]> | 2021-07-25 10:30:51 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2021-07-25 10:30:51 -0500 |
| commit | 1804c35d5306fc9c34c07655419fa8449c501162 (patch) | |
| tree | 9c55e3505949c533108a5d01ea028f9acbedd7d4 /certbot-dns-cloudflare | |
| parent | 33e25728398a9ccdd446197b1eb12e66c40a890e (diff) | |
Lots of updates.
Diffstat (limited to 'certbot-dns-cloudflare')
| -rw-r--r-- | certbot-dns-cloudflare/tasks/main.yaml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/certbot-dns-cloudflare/tasks/main.yaml b/certbot-dns-cloudflare/tasks/main.yaml index b80e554..1ded6c9 100644 --- a/certbot-dns-cloudflare/tasks/main.yaml +++ b/certbot-dns-cloudflare/tasks/main.yaml @@ -21,3 +21,14 @@ mode: "0644" owner: "root" group: "root" + +- name: check if cert exists + become: yes + stat: path="/etc/letsencrypt/live/{{certbot_dns_cloudflare_domain}}/cert.pem" + register: cert + +- name: run certbot + become: yes + command: "certbot certonly -n --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/cred.conf -d {{certbot_dns_cloudflare_domain}}" + when: not cert.stat.exists + changed_when: false |
