Installer bugfix (part 2).
authorWard Vandewege <ward@curii.com>
Tue, 12 Apr 2022 20:10:10 +0000 (16:10 -0400)
committerWard Vandewege <ward@curii.com>
Tue, 12 Apr 2022 20:10:10 +0000 (16:10 -0400)
refs #16375

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

tools/salt-install/provision.sh

index 080029876be98f6f012c70ac7d07bedb9d7aa405..669d04d92fa250dbe6a17978add5d5b88d3706e5 100755 (executable)
@@ -548,15 +548,17 @@ if [ -z "${ROLES}" ]; then
       grep -q "aws_credentials" ${S_DIR}/top.sls || echo "    - extra.aws_credentials" >> ${S_DIR}/top.sls
     fi
     grep -q "letsencrypt"     ${S_DIR}/top.sls || echo "    - letsencrypt" >> ${S_DIR}/top.sls
-  elif [ "${SSL_MODE}" = "bring-your-own" ]; then
-    # Copy certs to formula extra/files
+  else
     mkdir -p /srv/salt/certs
-    cp -rv ${CUSTOM_CERTS_DIR}/* /srv/salt/certs/
-    # We add the custom_certs state
-    grep -q "custom_certs"    ${S_DIR}/top.sls || echo "    - extra.custom_certs" >> ${S_DIR}/top.sls
+    if [ "${SSL_MODE}" = "bring-your-own" ]; then
+      # Copy certs to formula extra/files
+      cp -rv ${CUSTOM_CERTS_DIR}/* /srv/salt/certs/
+      # We add the custom_certs state
+      grep -q "custom_certs"    ${S_DIR}/top.sls || echo "    - extra.custom_certs" >> ${S_DIR}/top.sls
+    fi
+    # In self-signed mode, the certificate files will be created and put in the
+    # destination directory by the snakeoil_certs.sls state file
   fi
-  # In self-signed mode, the certificate files will be created and put in the
-  # destination directory by the snakeoil_certs.sls state file
 
   echo "    - postgres" >> ${S_DIR}/top.sls
   echo "    - docker.software" >> ${S_DIR}/top.sls