summaryrefslogtreecommitdiff
path: root/common/utils.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-12-08 16:58:23 +0100
committerChristian Pointner <equinox@spreadspace.org>2018-12-08 16:58:23 +0100
commita4ad09126e0dbb043a35fc0794e4c14ab123e4e4 (patch)
treea8882171acfa96af3ff6b025cdf0b51b4fa38225 /common/utils.sh
parentimprove handling of environment groups (diff)
make error message for get_ansible_variable more generic
Diffstat (limited to 'common/utils.sh')
-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")'