Fix non-existing all.yml file 12/71012/1
authorVictor Morales <victor.morales@intel.com>
Mon, 22 Oct 2018 15:40:21 +0000 (08:40 -0700)
committerVictor Morales <victor.morales@intel.com>
Mon, 22 Oct 2018 15:44:39 +0000 (08:44 -0700)
The all.yml file contains global configuration used by kubespray.
During the initial execution this file doesn't exist and its
execution can raise an error. This change fix that scenario.

Change-Id: I1f0c0134ccbc439b6a6c3e26c993cf498bb8dbf8
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: MULTICLOUD-301

vagrant/installer.sh

index 30683cb..5fdcaeb 100755 (executable)
@@ -123,7 +123,7 @@ function install_k8s {
 
     pushd $dest_folder/kubespray-$version
         pip install -r requirements.txt
-        rm -f $krd_inventory_folder/group_vars/all.yml
+        rm -f $krd_inventory_folder/group_vars/all.yml 2> /dev/null
         if [[ -n "${verbose+x}" ]]; then
             echo "kube_log_level: 5" >> $krd_inventory_folder/group_vars/all.yml
         else