Merge "Add a return code check to the osa wrapper"
This commit is contained in:
commit
eb67707b5d
@ -266,6 +266,14 @@ fi
|
|||||||
# Execute the Ansible command.
|
# Execute the Ansible command.
|
||||||
if [ "\${RUN_CMD}" == "openstack-ansible" ] || [ "\${RUN_CMD}" == "ansible-playbook" ]; then
|
if [ "\${RUN_CMD}" == "openstack-ansible" ] || [ "\${RUN_CMD}" == "ansible-playbook" ]; then
|
||||||
ansible-playbook "\${@}" \${VAR1}
|
ansible-playbook "\${@}" \${VAR1}
|
||||||
|
PLAYBOOK_RC="\$?"
|
||||||
|
if [[ "\${PLAYBOOK_RC}" -ne "0" ]]; then
|
||||||
|
echo -e "\nEXIT NOTICE [Playbook execution failure] **************************************"
|
||||||
|
else
|
||||||
|
echo -e "\nEXIT NOTICE [Playbook execution success] **************************************"
|
||||||
|
fi
|
||||||
|
echo "==============================================================================="
|
||||||
|
exit "\${PLAYBOOK_RC}"
|
||||||
else
|
else
|
||||||
\${RUN_CMD} "\${@}"
|
\${RUN_CMD} "\${@}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user