add missing condition
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Robert Kaussow 2020-10-10 10:22:46 +02:00
parent 7a8de4ed94
commit 520c697daf
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 6 additions and 8 deletions

View File

@ -1,5 +1,2 @@
- ENHANCEMENT - BUGFIX
- Add env variable `MOLECULE_ANSIBLE_VAULT_PASSWORD`. - add missing condition for `MOLECULE_ANSIBLE_VAULT_PASSWORD`
If the variable is set, the value is written to
`ANSIBLE_VAULT_PASSWORD_FILE=/root/.vaultpasswd and
passed to molecule.

View File

@ -22,7 +22,8 @@ if [ -n "${MOLECULE_CUSTOM_FILTERS_REPO}" ]; then
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" "$WORKDIR" 2> /dev/null git clone "$MOLECULE_CUSTOM_FILTERS_REPO" "$WORKDIR" 2> /dev/null
fi fi
touch /root/.vaultpasswd if [ -n "${MOLECULE_ANSIBLE_VAULT_PASSWORD}" ]; then
echo "${MOLECULE_ANSIBLE_VAULT_PASSWORD}" > /root/.vaultpasswd 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 "$@"