diff --git a/defaults/main.yml b/defaults/main.yml index 55d2072..7a71d80 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,7 +21,9 @@ certbot_dir: /opt/certbot # Set to true to have this role register and generate certificates for your # domains. 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 certbot_register_command: "{{ certbot_script }} register --non-interactive --agree-tos --email {{ certbot_register_email }}" diff --git a/tasks/generate-certs.yml b/tasks/generate-certs.yml index 78633c7..ff3a236 100644 --- a/tasks/generate-certs.yml +++ b/tasks/generate-certs.yml @@ -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 command: "{{ certbot_register_command }}"