From a4ad09126e0dbb043a35fc0794e4c14ab123e4e4 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 8 Dec 2018 16:58:23 +0100 Subject: make error message for get_ansible_variable more generic --- common/utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/utils.sh') diff --git a/common/utils.sh b/common/utils.sh index 2749eda6..119305de 100644 --- a/common/utils.sh +++ b/common/utils.sh @@ -12,8 +12,8 @@ get_ansible_variable() { local _num_results=$(echo "$_result" | wc -l) if [ $_num_results -ne 1 ]; then - echo "ERROR: hosts may only belong to one environment group but got: $(echo $_result | xargs | sed 's/ /, /g')" - return 1 + echo "ERROR: the vairable '$_var_name' is not unique for the given hosts '$_hosts', got values: $(echo $_result | xargs | sed 's/ /, /g')" + return 2 fi eval "$_var_name"='$(echo "$_result")' -- cgit v1.2.3