summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
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