Skip to content
Snippets Groups Projects
Commit 35b92825 authored by Michal Nasiadka's avatar Michal Nasiadka
Browse files

cli: fix find globals.d

Currently when the /etc/kolla/globals.d directory does not exist
it writes an error on stderr.

Change-Id: I2d4b3dd9dde3d383af213dc6fd376bc14c650a7d
parent dbb4f3d0
No related branches found
No related tags found
No related merge requests found
......@@ -567,7 +567,7 @@ EOF
esac
GLOBALS_DIR="${CONFIG_DIR}/globals.d"
EXTRA_GLOBALS=$(find ${GLOBALS_DIR} -maxdepth 1 -type f -name '*.yml' -printf ' -e @%p' || true 2>/dev/null)
EXTRA_GLOBALS=$([ -d "${GLOBALS_DIR}" ] && find ${GLOBALS_DIR} -maxdepth 1 -type f -name '*.yml' -printf ' -e @%p' || true 2>/dev/null)
PASSWORDS_FILE="${PASSWORDS_FILE:-${CONFIG_DIR}/passwords.yml}"
CONFIG_OPTS="-e @${CONFIG_DIR}/globals.yml ${EXTRA_GLOBALS} -e @${PASSWORDS_FILE} -e CONFIG_DIR=${CONFIG_DIR}"
CMD="ansible-playbook $CONFIG_OPTS $EXTRA_OPTS $PLAYBOOK $VERBOSITY"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment