add missing condition
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
7a8de4ed94
commit
520c697daf
@ -1,5 +1,2 @@
|
||||
- ENHANCEMENT
|
||||
- Add env variable `MOLECULE_ANSIBLE_VAULT_PASSWORD`.
|
||||
If the variable is set, the value is written to
|
||||
`ANSIBLE_VAULT_PASSWORD_FILE=/root/.vaultpasswd and
|
||||
passed to molecule.
|
||||
- BUGFIX
|
||||
- add missing condition for `MOLECULE_ANSIBLE_VAULT_PASSWORD`
|
||||
|
@ -22,7 +22,8 @@ if [ -n "${MOLECULE_CUSTOM_FILTERS_REPO}" ]; then
|
||||
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" "$WORKDIR" 2> /dev/null
|
||||
fi
|
||||
|
||||
touch /root/.vaultpasswd
|
||||
echo "${MOLECULE_ANSIBLE_VAULT_PASSWORD}" > /root/.vaultpasswd
|
||||
if [ -n "${MOLECULE_ANSIBLE_VAULT_PASSWORD}" ]; then
|
||||
echo "${MOLECULE_ANSIBLE_VAULT_PASSWORD}" > /root/.vaultpasswd
|
||||
fi
|
||||
|
||||
exec env ANSIBLE_VAULT_PASSWORD_FILE=/root/.vaultpasswd /usr/local/bin/molecule "$@"
|
||||
exec env ANSIBLE_VAULT_PASSWORD_FILE="${MOLECULE_ANSIBLE_VAULT_PASSWORD}" /usr/local/bin/molecule "$@"
|
||||
|
Reference in New Issue
Block a user