2020-12-24 14:27:31 +01:00
|
|
|
- name: install certbot
|
|
|
|
pacman:
|
|
|
|
name: [certbot,certbot-nginx]
|
|
|
|
state: present
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_nginx_certbot is not defined
|
2020-12-24 14:27:31 +01:00
|
|
|
|
|
|
|
- name: configure certbot.service.tpl
|
2023-04-16 10:33:21 +02:00
|
|
|
template:
|
|
|
|
src: certbot.service.j2
|
|
|
|
dest: /etc/systemd/system/certbot.service
|
|
|
|
notify: reload certbot service
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_nginx_certbot is not defined
|
2020-12-24 14:27:31 +01:00
|
|
|
|
|
|
|
- name: configure certbot.timer.tpl
|
2023-04-16 10:33:21 +02:00
|
|
|
template:
|
|
|
|
src: certbot.timer.j2
|
|
|
|
dest: /etc/systemd/system/certbot.timer
|
2023-11-16 19:43:54 +01:00
|
|
|
register: certbot_timer
|
2024-01-03 12:07:19 +01:00
|
|
|
changed_when: certbot_timer.changed or activate_all_timers | bool
|
2020-12-24 14:27:31 +01:00
|
|
|
notify: restart certbot timer
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_nginx_certbot is not defined
|
|
|
|
|
|
|
|
- name: run the nginx_certbot tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_nginx_certbot: true
|
|
|
|
when: run_once_nginx_certbot is not defined
|