summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-05-19 11:59:26 +0300
committerLars Wirzenius <liw@liw.fi>2019-05-19 11:59:26 +0300
commit2c6ae97402f1e1437fb539a22c09d45a9e8deddb (patch)
treea3e548a5149ad41bd98506c5b20bef39e9712380 /roles
parent37597ade1c9a21cefddc556d663951975b784a37 (diff)
downloaddebian-ansible-2c6ae97402f1e1437fb539a22c09d45a9e8deddb.tar.gz
Fix: how we check that haproxy_domain is set
Diffstat (limited to 'roles')
-rw-r--r--roles/haproxy/tasks/main.yml25
1 files changed, 11 insertions, 14 deletions
diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml
index 6a88f31..2fc6d5e 100644
--- a/roles/haproxy/tasks/main.yml
+++ b/roles/haproxy/tasks/main.yml
@@ -1,20 +1,18 @@
- name: "check haproxy_domain is set"
shell: |
- case "{{ haproxy_domain }}" in
- FIXME)
- echo "ERROR: MUST set haproxy_domain" 1>&2
- exit 1
- ;;
- esac
+ if [ "{{ haproxy_domain }}" = "" ] || [ "{{ haproxy_domain }}" = "FIXME" ]
+ then
+ echo "ERROR: MUST set haproxy_domain" 1>&2
+ exit 1
+ fi
- name: "check letsencrypt_email is set"
shell: |
- case "{{ letsencrypt_email }}" in
- FIXME)
- echo "ERROR: MUST set letsencrypt_email" 1>&2
- exit 1
- ;;
- esac
+ if [ "{{ letsencrypt_email }}" = "" ] || [ "{{ letsencrypt_email }}" = "FIXME" ]
+ then
+ echo "ERROR: MUST set letsencrypt_email" 1>&2
+ exit 1
+ fi
- name: "install certbot"
apt:
@@ -111,5 +109,4 @@
service:
state: restarted
enabled: yes
- name:
- - haproxy
+ name: haproxy