File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,15 @@ template::render::env::vault() {
6060}
6161
6262ocfp::vault::prefix () {
63+ [[ -z " ${OCFP_VAULT_PREFIX:- } " ]] || return 0
64+
6365 if want_feature sharded-vault-paths
64- then
66+ then # Madness. Not a best practice. Don't do this.
67+ DEPLOYMENTS_PATH=" ${DEPLOYMENTS_PATH:- " ${HOME} /deployments" } "
68+
69+ [[ -d " ${DEPLOYMENTS_PATH} /bosh/.genesis/manifests" ]] ||
70+ fail " No deployment manifests found at ${DEPLOYMENTS_PATH} /bosh/.genesis/manifests!"
71+
6572 OCFP_VAULT_PREFIX=$(
6673 cat ${DEPLOYMENTS_PATH} /bosh/.genesis/manifests/${OCFP_ENV_NAME} .yml |
6774 spruce json | jq -r ' .genesis.secrets_mount' | sed -e ' s#^/##' -e ' s#/$##'
@@ -79,11 +86,7 @@ set -eu
7986
8087declare feature env_name mgmt_env
8188declare -a yamls opsfiles ocf_envs fqdns
82- declare -x OCFP_VAULT_PREFIX OCFP_ENV_NAME OCFP_ENV_PATH DEPLOYMENTS_PATH
83-
84- DEPLOYMENTS_PATH=" ${DEPLOYMENTS_PATH:- " ${HOME} /deployments" } "
85- [[ -d " ${DEPLOYMENTS_PATH} /bosh/.genesis/manifests" ]] ||
86- fail " No deployment manifests found at ${DEPLOYMENTS_PATH} /bosh/.genesis/manifests!"
89+ declare -x OCFP_VAULT_PREFIX OCFP_ENV_NAME OCFP_ENV_PATH DEPLOYMENTS_PATH OCFP_VAULT_PREFIX
8790
8891yamls=()
8992opsfiles=()
You can’t perform that action at this time.
0 commit comments