diff --git a/root/etc/profile.d/getup.sh b/root/etc/profile.d/getup.sh index 970eeab..e7167ea 100755 --- a/root/etc/profile.d/getup.sh +++ b/root/etc/profile.d/getup.sh @@ -244,9 +244,11 @@ function get_tf_config() case "$(hcl2json "$TF_VARS_FILE" | jq -Mrc ".${tf_var_name}|type")" in string|number|object) hcl2json "$TF_VARS_FILE" | jq -Mrc ".${tf_var_name}" + return ;; array) hcl2json "$TF_VARS_FILE" | jq -Mrc ".${tf_var_name}|join(\"\n\")" + return esac echo $default diff --git a/root/usr/local/bin/kubespray-apply b/root/usr/local/bin/kubespray-apply index dd1e9a7..b0ba08d 100755 --- a/root/usr/local/bin/kubespray-apply +++ b/root/usr/local/bin/kubespray-apply @@ -4,7 +4,7 @@ set -eu source /etc/profile.d/getup.sh -if [[ "$1" =~ (-h|--help) ]] ; then +if [ $# -gt 0 ] && [[ "$1" =~ (-h|--help) ]] ; then echo "Usage: $0 [ansible-playbook parameters...]" exit 1 fi