Skip to content
Snippets Groups Projects
Commit 17b1d476 authored by Daniel Tovarňák's avatar Daniel Tovarňák
Browse files

Merge branch...

Merge branch '9-networking-ansible-stage-doesn-t-fail-when-it-cannot-access-the-remote-repository' into 'master'

Resolve "Networking Ansible Stage doesn't fail when it cannot access the remote repository"

Closes #9

See merge request kypo-crp/backend-python/kypo-ansible-runner!11
parents ff575e40 562a732e
Branches
Tags
No related merge requests found
...@@ -49,22 +49,27 @@ if [ $? != 0 ]; then ...@@ -49,22 +49,27 @@ if [ $? != 0 ]; then
exit 1 exit 1
fi fi
git clone $REPO_URL ansible_repo git clone $REPO_URL ansible_repo || exit 1
cd ansible_repo cd ansible_repo || exit 1
if [ $REVISION ]; then if [ $REVISION ]; then
git checkout $REVISION || exit 1 git checkout $REVISION || exit 1
fi fi
git submodule update --init --recursive git submodule update --init --recursive || exit 1
cd provisioning || exit 1 cd provisioning || exit 1
REQUIREMENTS_FILE="requirements.yml" REQUIREMENTS_FILE="requirements.yml"
if [ -f $REQUIREMENTS_FILE ]; then if [ -f $REQUIREMENTS_FILE ]; then
ansible-galaxy install -r $REQUIREMENTS_FILE -p roles ansible-galaxy install -r $REQUIREMENTS_FILE -p roles || exit 1
fi fi
PRE_PLAYBOOK_FILE="pre-playbook.yml" PRE_PLAYBOOK_FILE="pre-playbook.yml"
if [ -f $PRE_PLAYBOOK_FILE ]; then if [ -f $PRE_PLAYBOOK_FILE ]; then
ansible-playbook $PRE_PLAYBOOK_FILE -i "${INVENTORY_FILE}" -vv ansible-playbook $PRE_PLAYBOOK_FILE -i "${INVENTORY_FILE}" -vv
ANSIBLE_ERROR=$?
if [ "$ANSIBLE_ERROR" != 0 ]
then
exit $ANSIBLE_ERROR
fi
fi fi
PLAYBOOK_FILE="playbook.yml" PLAYBOOK_FILE="playbook.yml"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment