run ansible-galaxy if requirements file is present
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7907b88f09
commit
549f38c317
@ -4,6 +4,9 @@ set -o errtrace
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
|
ANSIBLE_ROLES_PATH=${ANSIBLE_ROLES_PATH:-/drone/src}
|
||||||
|
MOLECULE_REQUIREMENTS_FILE=${MOLECULE_REQUIREMENTS_FILE:-./requirements.yml}
|
||||||
|
|
||||||
if [ "${MOLECULE_CUSTOM_MODULES_REPO}" ]; then
|
if [ "${MOLECULE_CUSTOM_MODULES_REPO}" ]; then
|
||||||
mkdir ./library/
|
mkdir ./library/
|
||||||
git clone "$MOLECULE_CUSTOM_MODULES_REPO" ./library/
|
git clone "$MOLECULE_CUSTOM_MODULES_REPO" ./library/
|
||||||
@ -13,3 +16,7 @@ if [ "${MOLECULE_CUSTOM_FILTERS_REPO}" ]; then
|
|||||||
mkdir -p ./plugins/filters/
|
mkdir -p ./plugins/filters/
|
||||||
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" ./plugins/filters/
|
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" ./plugins/filters/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "$MOLECULE_REQUIREMENTS_FILE" ]; then
|
||||||
|
ansible-galaxy install --force -r "$MOLECULE_REQUIREMENTS_FILE" -p "$ANSIBLE_ROLES_PATH"
|
||||||
|
fi
|
||||||
|
@ -4,6 +4,9 @@ set -o errtrace
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
|
ANSIBLE_ROLES_PATH=${ANSIBLE_ROLES_PATH:-/drone/src}
|
||||||
|
MOLECULE_REQUIREMENTS_FILE=${MOLECULE_REQUIREMENTS_FILE:-./requirements.yml}
|
||||||
|
|
||||||
if [ "$GCE_SSH_KEY" ]; then
|
if [ "$GCE_SSH_KEY" ]; then
|
||||||
echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine
|
echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine
|
||||||
chmod 600 $HOME/.ssh/google_compute_engine
|
chmod 600 $HOME/.ssh/google_compute_engine
|
||||||
@ -24,3 +27,7 @@ if [ "${MOLECULE_CUSTOM_FILTERS_REPO}" ]; then
|
|||||||
mkdir -p ./plugins/filters/
|
mkdir -p ./plugins/filters/
|
||||||
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" ./plugins/filters/
|
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" ./plugins/filters/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "$MOLECULE_REQUIREMENTS_FILE" ]; then
|
||||||
|
ansible-galaxy install --force -r "$MOLECULE_REQUIREMENTS_FILE" -p "$ANSIBLE_ROLES_PATH"
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user