diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-08 18:24:11 -0700 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-11 18:36:51 -0700 |
| commit | 4eb261b2ae0eb42d3a2e01550bb1fad7470ceec3 (patch) | |
| tree | ad17465f635fe305363c827b94507051dadf4110 | |
| parent | Resolve ansible-lint findings (diff) | |
| download | site-configs-4eb261b2ae0eb42d3a2e01550bb1fad7470ceec3.zip | |
Add a crontab entry to renew the git.eugenetriguba.com cert
| -rw-r--r-- | roles/acme_client/tasks/main.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/acme_client/tasks/main.yml b/roles/acme_client/tasks/main.yml index 531857f..8b2e95f 100644 --- a/roles/acme_client/tasks/main.yml +++ b/roles/acme_client/tasks/main.yml @@ -31,3 +31,15 @@ ansible.builtin.command: acme-client {{ acme_client_domain }} args: creates: "/etc/ssl/{{ acme_client_domain }}.fullchain.pem" + +- name: Add certificate renewal crontab entry + # Implements the example from `man acme-client` + # > A cron(8) job can renew the certificate as necessary. On renewal, + # > httpd(8) is reloaded: + # > + # > ~ * * * * acme-client example.com && rcctl reload httpd + ansible.builtin.cron: + name: "renew {{ acme_client_domain }} certificate" + minute: "~" + user: root + job: "acme-client {{ acme_client_domain }} && rcctl reload httpd" |