File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 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 %}
You can’t perform that action at this time.
0 commit comments