2024-01-08 19:35:01 +01:00
|
|
|
- name: "recieve certbot certificate for {{ domain }}"
|
2024-01-08 11:20:44 +01:00
|
|
|
command: >-
|
|
|
|
certbot certonly --agree-tos --email {{ administrator_email }}
|
|
|
|
--non-interactive --webroot -w /var/lib/letsencrypt/ -d {{ domain }}
|
2025-01-29 15:52:40 +01:00
|
|
|
{{ '--test-cert' if mode_test | bool else '' }}
|
|
|
|
when: not enable_one_letsencrypt_cert_for_all
|
|
|
|
|
|
|
|
- name: "recieve certbot certificate for *{{ primary_domain }}"
|
|
|
|
command: >-
|
|
|
|
certbot certonly --agree-tos --email {{ administrator_email }}
|
|
|
|
--non-interactive --webroot -w /var/lib/letsencrypt/ -d {{ primary_domain }} -d *.{{ primary_domain }}
|
|
|
|
{{ '--test-cert' if mode_test | bool else '' }}
|
|
|
|
when: enable_one_letsencrypt_cert_for_all and run_once_recieve_certificate is not defined
|
|
|
|
|
2025-01-29 17:01:54 +01:00
|
|
|
- name: "cleanup dedicated cert for {{ domain }}"
|
|
|
|
command: >-
|
|
|
|
certbot delete --cert-name {{ domain }} --non-interactive
|
|
|
|
when: mode_cleanup and enable_one_letsencrypt_cert_for_all and run_once_recieve_certificate is not defined
|
|
|
|
|
|
|
|
|
2025-01-29 15:52:40 +01:00
|
|
|
- name: run the recieve_certificate tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_recieve_certificate: true
|
|
|
|
when: run_once_recieve_certificate is not defined
|