The installed version is available in kud-vars.yml. Read the value
from there before running the reset playbook.
Issue-ID: ICN-525
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I13f6f54ac3794d2a7ee9e7329c4f81305abf8ebe
echo "[ICN] Uninstalling EMCO k8s"
cd k8s/kud/hosting_providers/vagrant
echo "[ICN] Uninstalling EMCO k8s"
cd k8s/kud/hosting_providers/vagrant
-ansible-playbook -i inventory/hosts.ini /opt/kubespray-2.12.6/reset.yml --become --become-user=root -e reset_confirmation=yes
+version=$(grep "kubespray_version" ../../deployment_infra/playbooks/kud-vars.yml | awk -F ': ' '{print $2}')
+ansible-playbook -i inventory/hosts.ini /opt/kubespray-${version}/reset.yml --become --become-user=root -e reset_confirmation=yes
echo "[ICN] Purging Docker fully"
cat << EOF | tee purge-docker.yml
echo "[ICN] Purging Docker fully"
cat << EOF | tee purge-docker.yml
function kud_reset {
pushd $DOWNLOAD_PATH/multicloud-k8s/kud/hosting_providers/vagrant/
function kud_reset {
pushd $DOWNLOAD_PATH/multicloud-k8s/kud/hosting_providers/vagrant/
- ansible-playbook -i inventory/hosts.ini /opt/kubespray-2.10.4/reset.yml \
+ local version=$(grep "kubespray_version" ../../deployment_infra/playbooks/kud-vars.yml |
+ awk -F ': ' '{print $2}')
+ ansible-playbook -i inventory/hosts.ini /opt/kubespray-${version}/reset.yml \
--become --become-user=root -e reset_confirmation=yes
popd
}
--become --become-user=root -e reset_confirmation=yes
popd
}
function verifier {
APISERVER=$(kubectl config view --minify -o \
jsonpath='{.clusters[0].cluster.server}')
function verifier {
APISERVER=$(kubectl config view --minify -o \
jsonpath='{.clusters[0].cluster.server}')