Revert "fetch_os_creds.sh: Fix unbound BUILD_TAG" 93/44293/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 4 Oct 2017 23:59:26 +0000 (23:59 +0000)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 4 Oct 2017 23:59:26 +0000 (23:59 +0000)
This reverts commit 3f27c8b519e42295bd76ace5506903f265e48560.

Change-Id: I024ba8c0b960387138a71be9bc19f6d1b72030ca

utils/fetch_os_creds.sh

index 7a79da4..ac75950 100755 (executable)
@@ -114,8 +114,10 @@ if [ "$installer_type" == "fuel" ]; then
         ssh ${ssh_options} "${ssh_user}@${controller_ip}" \
             "sudo cat /root/keystonercv3" > "${dest_path}"
 
-        ssh ${ssh_options} "${ssh_user}@${installer_ip}" \
-            "cat /etc/ssl/certs/os_cacert" > "${os_cacert}" || touch "${os_cacert}"
+        if [[ "${BUILD_TAG}" =~ "baremetal" ]]; then
+            ssh ${ssh_options} "${ssh_user}@${installer_ip}" \
+                "cat /etc/ssl/certs/os_cacert" > "${os_cacert}"
+        fi
     else
         env=$(sshpass -p r00tme ssh 2>/dev/null ${ssh_options} root@${installer_ip} \
             'fuel env'|grep operational|head -1|awk '{print $1}') &> /dev/null