Skip to content

Commit 561999f

Browse files
authored
Merge pull request #678 from OpenConext/release/661
release/661
2 parents f5df06c + af6b91a commit 561999f

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

roles/haproxy/defaults/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ haproxy_acmedns:
4545
password: "password"
4646
subdomain: "a_subdomain"
4747
fulldomain: "a_subdomain.acme-dns.example.org"
48+
49+
# on which weekday (cron, 0==sunday) to run the renewal script
50+
haproxy_acme_cronjob_dow: 1
51+
52+
# optional monitoring url for acme cron
53+
haproxy_acme_cronjob_monitor_url:

roles/haproxy/tasks/acme.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,21 @@
5454
register: "acme_account"
5555
become: true
5656
become_user: "acme"
57+
58+
- name: Remove default cronjob for renewal
59+
ansible.builtin.file:
60+
path: "/var/spool/cron/crontabs/acme"
61+
state: "absent"
62+
63+
- name: Install cronjob for renewal
64+
ansible.builtin.copy:
65+
dest: "/etc/cron.d/acme-renew"
66+
owner: "root"
67+
group: "root"
68+
mode: "0644"
69+
content: |
70+
MAILTO=surfconext-beheer@surf.nl
71+
30 07 * * {{ haproxy_acme_cronjob_dow }} acme /home/acme/.acme.sh/acme.sh --cron --home /home/acme/.acme.sh > /dev/null
72+
{%- if haproxy_acme_cronjob_monitor_url | default('') -%}
73+
{# #} && curl -fsS --retry 3 -o /dev/null {{ haproxy_acme_cronjob_monitor_url }}
74+
{%- endif %}

0 commit comments

Comments
 (0)