summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/utils.sh4
1 files changed, 2 insertions, 2 deletions
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")'