This commit is contained in:
tterranigma
2017-11-06 09:33:15 +00:00
committed by GitHub
4 changed files with 72 additions and 4 deletions
+23
View File
@@ -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
+3
View File
@@ -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