aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-14 11:45:49 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-14 11:49:23 +0200
commite0ac1fa82073833a3860a8dfda558a9f6bf7a790 (patch)
tree7d04cd2992765dbe9d92ca3201560c882394d7d3
parentadd a bunch of READMEs for roles (diff)
downloadinfra-ansible-e0ac1fa82073833a3860a8dfda558a9f6bf7a790.tar.gz
infra-ansible-e0ac1fa82073833a3860a8dfda558a9f6bf7a790.zip
letsencrypt: fix manual token prompts
-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: