diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2023-03-31 14:02:33 +0200 |
|---|---|---|
| committer | Michal Nasiadka <mnasiadka@gmail.com> | 2023-03-31 14:03:14 +0200 |
| commit | 35b92825b1cf428e7de121a217f9064668006f33 (patch) | |
| tree | db79676708a1cc03ff32d76e8c362891906efe9a | |
| parent | dbb4f3d0aebd4763f2da5c8a89fdf30b05ad5ba7 (diff) | |
| download | kolla-ansible-35b92825b1cf428e7de121a217f9064668006f33.tar.gz kolla-ansible-35b92825b1cf428e7de121a217f9064668006f33.zip | |
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
| -rwxr-xr-x | tools/kolla-ansible | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible index 3766db617..9fce6e824 100755 --- a/tools/kolla-ansible +++ b/tools/kolla-ansible @@ -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" |
