Fixing ansible version 08/88008/5
authorMichal Ptacek <m.ptacek@partner.samsung.com>
Fri, 17 May 2019 14:38:19 +0000 (14:38 +0000)
committerSamuli Silvius <s.silvius@partner.samsung.com>
Tue, 21 May 2019 13:12:24 +0000 (13:12 +0000)
It would be safer to fix ansible version to prevent issues
coming with newer ansible releases which might not be
compatible with current playbooks within this repo.
E.g. 2.8.0 is not compatible.

Change-Id: Ia1b54c7644bcaf6c453ff6586682ca35ced9acec
Issue-ID: MULTICLOUD-634
Signed-off-by: Michal Ptacek <m.ptacek@partner.samsung.com>
Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
kud/deployment_infra/playbooks/kud-vars.yml
kud/hosting_providers/vagrant/installer.sh

index 8e4f3c4..d7ada47 100644 (file)
@@ -61,3 +61,5 @@ go_version: '1.12.4'
 kubespray_version: 2.8.2
 kubectl_version: 1.12.2
 helm_client_version: 2.9.1
+# kud playbooks not compatible with 2.8.0 - see MULTICLOUD-634
+ansible_version: 2.7.10
index c17f89e..0ea8930 100755 (executable)
@@ -40,12 +40,13 @@ function _install_pip {
 
 # _install_ansible() - Install and Configure Ansible program
 function _install_ansible {
-    sudo mkdir -p /etc/ansible/
     if $(ansible --version &>/dev/null); then
-        return
+        sudo pip uninstall -y ansible
     fi
     _install_pip
-    sudo -E pip install ansible
+    local version=$(grep "ansible_version" ${kud_playbooks}/kud-vars.yml | awk -F ': ' '{print $2}')
+    sudo mkdir -p /etc/ansible/
+    sudo -E pip install ansible==$version
 }
 
 # _install_docker() - Download and install docker-engine