mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Checks if domain names are given
This commit is contained in:
parent
368de86163
commit
de14ee2476
@ -29,8 +29,7 @@ certbot_register_email: ''
|
|||||||
certbot_register_command: "{{ certbot_script }} register --non-interactive --agree-tos --email {{ certbot_register_email }}"
|
certbot_register_command: "{{ certbot_script }} register --non-interactive --agree-tos --email {{ certbot_register_email }}"
|
||||||
|
|
||||||
# The domains to generate certs for
|
# The domains to generate certs for
|
||||||
certbot_domains:
|
certbot_domains: []
|
||||||
- 'example.com'
|
|
||||||
|
|
||||||
# The command to run to generate the certificates
|
# The command to run to generate the certificates
|
||||||
certbot_cert_command: "{{ certbot_script }} certonly --noninteractive --standalone"
|
certbot_cert_command: "{{ certbot_script }} certonly --noninteractive --standalone"
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
- "certbot_register_email != ''"
|
- "certbot_register_email != ''"
|
||||||
msg: "You need to provide an email address you own to register with Let's Encrypt."
|
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
|
- name: Register with Let's Encrypt
|
||||||
command: "{{ certbot_register_command }}"
|
command: "{{ certbot_register_command }}"
|
||||||
args:
|
args:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user