aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/letsencrypt/tasks/main.yml7
1 files changed, 6 insertions, 1 deletions
diff --git a/roles/letsencrypt/tasks/main.yml b/roles/letsencrypt/tasks/main.yml
index 814c549..d12aad2 100644
--- a/roles/letsencrypt/tasks/main.yml
+++ b/roles/letsencrypt/tasks/main.yml
@@ -40,7 +40,12 @@
- name: Set the token as a fact
ansible.builtin.set_fact:
- digitalocean_token: "{{ digitalocean_.user_input | default(lookup('env', 'DIGITALOCEAN_TOKEN')) }}"
+ digitalocean_token: "{{ digitalocean_token.user_input | default(lookup('env', 'DIGITALOCEAN_TOKEN')) }}"
+
+ - name: Fail if the token is invalid
+ ansible.builtin.fail:
+ msg: 'DigitalOcean token is invalid'
+ when: digitalocean_token | length == 0
- name: Configure certbot.ini
ansible.builtin.template: