Always source the kubespray-installer virtualenv
Change-Id: I8d0e2689a97b0a24b765640f21aae0b34e64b17a
diff --git a/kubespray-installer/setup.sh b/kubespray-installer/setup.sh
index aab3986..3491c2e 100755
--- a/kubespray-installer/setup.sh
+++ b/kubespray-installer/setup.sh
@@ -38,12 +38,16 @@
if [ ! -x "ks_venv/bin/activate" ]
then
virtualenv ks_venv
+ # shellcheck disable=SC1091
+ source ks_venv/bin/activate
+
pip install ansible==2.5.3
pip install -r kubespray/requirements.txt
+ else
+ # shellcheck disable=SC1091
+ source ks_venv/bin/activate
fi
- # shellcheck disable=SC1091
- source ks_venv/bin/activate
# Generate inventory and var files
echo "Generating The Inventory File"