bifrost: bifrost-provision.sh: Always initialize XCI_ANSIBLE_VERBOSITY 41/44441/1
authorMarkos Chandras <mchandras@suse.de>
Fri, 6 Oct 2017 09:06:00 +0000 (10:06 +0100)
committerMarkos Chandras <mchandras@suse.de>
Fri, 6 Oct 2017 09:06:00 +0000 (10:06 +0100)
The XCI_ANSIBLE_VERBOSITY is normally exported by the XCI bootstrapping
process. However, sometimes it's necessary to run bifrost-provision.sh
by itself so we can debug machine provisioning. As a result of which,
we need to initialize this variable properly so we don't fail with
'unbound variable' errors.

Change-Id: I81c59cf8eb3369c001e952c2c0a2846ed8d95cdf
Signed-off-by: Markos Chandras <mchandras@suse.de>
bifrost/scripts/bifrost-provision.sh

index bd9493e..d48d6a8 100755 (executable)
@@ -19,6 +19,9 @@ USE_DHCP="false"
 USE_VENV="false"
 BUILD_IMAGE=true
 PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
+# This is normally exported by XCI env but we should initialize it here
+# in case we run this script on its own for debug purposes
+XCI_ANSIBLE_VERBOSITY=${XCI_ANSIBLE_VERBOSITY:-}
 
 # Ensure the right inventory files is used based on branch
 CURRENT_BIFROST_BRANCH=$(git rev-parse --abbrev-ref HEAD)