ansible-role-certbot/tasks/renew-cron.yml
2021-02-15 13:46:52 -05:00

19 lines
507 B
YAML

---
- name: Add cron job for certbot renewal (if configured).
cron:
name: Certbot automatic renewal.
job: "{{ certbot_script }} renew {{ certbot_auto_renew_options }}"
minute: "{{ certbot_auto_renew_minute }}"
hour: "{{ certbot_auto_renew_hour }}"
user: "{{ certbot_auto_renew_user }}"
when: not certbot_auto_renew_use_systemd
- name: Enable certbot renewal timer
systemd:
name: certbot-renew.timer
state: started
enabled: yes
when: certbot_auto_renew_use_systemd