This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
molecule/ec2-entrypoint.sh

23 lines
634 B
Bash
Raw Normal View History

2019-05-11 23:14:54 +00:00
#!/usr/bin/env bash
set -o pipefail
set -o errtrace
set -o nounset
set -o errexit
ANSIBLE_ROLES_PATH=${ANSIBLE_ROLES_PATH:-/drone/src}
MOLECULE_REQUIREMENTS_FILE=${MOLECULE_REQUIREMENTS_FILE:-./requirements.yml}
2019-05-11 23:14:54 +00:00
if [ "${MOLECULE_CUSTOM_MODULES_REPO}" ]; then
2019-05-12 11:57:14 +00:00
mkdir ./library/
git clone "$MOLECULE_CUSTOM_MODULES_REPO" ./library/
2019-05-11 23:14:54 +00:00
fi
2019-05-12 21:17:42 +00:00
2019-05-12 21:21:29 +00:00
if [ "${MOLECULE_CUSTOM_FILTERS_REPO}" ]; then
2019-05-12 21:38:48 +00:00
mkdir -p ./plugins/filters/
2019-05-12 21:21:29 +00:00
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" ./plugins/filters/
2019-05-12 21:17:42 +00:00
fi
if [ -f "$MOLECULE_REQUIREMENTS_FILE" ]; then
ansible-galaxy install --force -r "$MOLECULE_REQUIREMENTS_FILE" -p "$ANSIBLE_ROLES_PATH"
fi