From 2c6ae97402f1e1437fb539a22c09d45a9e8deddb Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 19 May 2019 11:59:26 +0300 Subject: Fix: how we check that haproxy_domain is set --- roles/haproxy/tasks/main.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'roles') 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 -- cgit v1.2.1