Merge "Add a return code check to the osa wrapper"

This commit is contained in:
Zuul 2018-01-19 20:59:35 +00:00 committed by Gerrit Code Review
commit eb67707b5d

View File

@ -266,6 +266,14 @@ fi
# Execute the Ansible command.
if [ "\${RUN_CMD}" == "openstack-ansible" ] || [ "\${RUN_CMD}" == "ansible-playbook" ]; then
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
\${RUN_CMD} "\${@}"
fi