Checks if email is given

pull/34/head
Nikolaos Kakouros 7 years ago
parent 133935d5af
commit 5ef3c252df
  1. 4
      defaults/main.yml
  2. 6
      tasks/generate-certs.yml

@ -21,7 +21,9 @@ certbot_dir: /opt/certbot
# Set to true to have this role register and generate certificates for your # Set to true to have this role register and generate certificates for your
# domains. # domains.
certbot_handle_certs: true certbot_handle_certs: true
certbot_register_email: user@example.com
# The email to register with (required).
certbot_register_email: ''
# The command to run to register with Let's Encrypt # The command to run to register with Let's Encrypt
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 }}"

@ -1,5 +1,11 @@
--- ---
- name: Make sure we have an email
assert:
that:
- "certbot_register_email is defined"
msg: "You need to provide an email address you own to register with Let's Encrypt."
- name: Register with Let's Encrypt - name: Register with Let's Encrypt
command: "{{ certbot_register_command }}" command: "{{ certbot_register_command }}"

Loading…
Cancel
Save