Merge branch '21086-cert-source'
[arvados.git] / tools / salt-install / common.sh
index d406f2ff60ab70522fc8f101d4c76f30ea17c15a..5d9dba14cdf2bd9585b712c2c028ffbe09de84c9 100644 (file)
@@ -16,6 +16,10 @@ else
   exit 1
 fi
 
+USE_SSH_JUMPHOST=${USE_SSH_JUMPHOST:-}
+DISABLED_CONTROLLER=""
+DATABASE_POSTGRESQL_DEFAULT_VERSION=15
+
 # Comma-separated list of nodes. This is used to dynamically adjust
 # salt pillars.
 NODELIST=""
@@ -29,7 +33,6 @@ done
 
 # The mapping of roles to nodes. This is used to dynamically adjust
 # salt pillars.
-declare -A ROLE2NODES
 for node in "${!NODES[@]}"; do
   roles="${NODES[$node]}"
 
@@ -51,3 +54,8 @@ if [ -z "${ROLE2NODES['balancer']:-}" ]; then
 else
   ENABLE_BALANCER="yes"
 fi
+
+# Auto-sets PG version if needed
+if [[ -n "${ROLE2NODES['database']:-}" || "${NODELIST}" == "localhost" ]]; then
+  DATABASE_POSTGRESQL_VERSION="${DATABASE_POSTGRESQL_VERSION:-${DATABASE_POSTGRESQL_DEFAULT_VERSION}}"
+fi
\ No newline at end of file