mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2026-08-26 09:31:26 +02:00
Merge fbe6399b00 into 574c0843c8
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
---
|
||||
|
||||
- name: Make sure we have an email
|
||||
assert:
|
||||
that:
|
||||
- "certbot_register_email != ''"
|
||||
msg: "You need to provide an email address you own to register with Let's Encrypt."
|
||||
|
||||
- name: Make sure we have domains
|
||||
assert:
|
||||
that:
|
||||
- "certbot_domains != []"
|
||||
msg: "You need to provide at least one domain to generate certificates for."
|
||||
|
||||
- name: Register with Let's Encrypt
|
||||
command: "{{ certbot_register_command }}"
|
||||
args:
|
||||
creates: /etc/letsencrypt/accounts
|
||||
|
||||
- name: Generate certificates
|
||||
command: "{{ certbot_cert_command }} -d {{ certbot_domains | join(' -d ') }}"
|
||||
register: result
|
||||
changed_when: result.stdout.find("Certificate not yet due for renewal") == -1
|
||||
@@ -7,5 +7,8 @@
|
||||
- include: install-from-source.yml
|
||||
when: certbot_install_from_source
|
||||
|
||||
- include: generate-certs.yml
|
||||
when: certbot_handle_certs
|
||||
|
||||
- include: renew-cron.yml
|
||||
when: certbot_auto_renew
|
||||
|
||||
Reference in New Issue
Block a user