diff options
author | Christian Pointner <equinox@spreadspace.org> | 2018-12-08 16:58:23 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2018-12-08 16:58:23 +0100 |
commit | a4ad09126e0dbb043a35fc0794e4c14ab123e4e4 (patch) | |
tree | a8882171acfa96af3ff6b025cdf0b51b4fa38225 | |
parent | improve handling of environment groups (diff) |
make error message for get_ansible_variable more generic
-rw-r--r-- | common/utils.sh | 4 |
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")' |