Skip to content
Snippets Groups Projects
Commit 1a316bc3 authored by Kamil Andoniadis's avatar Kamil Andoniadis
Browse files

Merge branch '11-check-ansible-playbook-error-status' into 'master'

Resolve: check for ansible-playbook error status

Closes #11

See merge request muni-kypo-crp/backend-python/kypo-ansible-runner!13
parents b32a75ff e4c0f6ef
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ autossh -M 12234 -f -N -D 12345 man ...@@ -66,7 +66,7 @@ autossh -M 12234 -f -N -D 12345 man
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 || exit "$?"
ANSIBLE_ERROR=$? ANSIBLE_ERROR=$?
if [ "$ANSIBLE_ERROR" != 0 ] if [ "$ANSIBLE_ERROR" != 0 ]
then then
...@@ -75,4 +75,4 @@ if [ -f $PRE_PLAYBOOK_FILE ]; then ...@@ -75,4 +75,4 @@ if [ -f $PRE_PLAYBOOK_FILE ]; then
fi fi
PLAYBOOK_FILE="playbook.yml" PLAYBOOK_FILE="playbook.yml"
ansible-playbook $PLAYBOOK_FILE -i "${INVENTORY_FILE}" -vv ansible-playbook $PLAYBOOK_FILE -i "${INVENTORY_FILE}" -vv || exit "$?"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment