Created
July 26, 2020 10:10
-
-
Save duffney/45123253c54508c81a401533877b75ee to your computer and use it in GitHub Desktop.
Ansible entrypoint.sh using if statement to throw on failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ! ansible-playbook -i hosts_azure_rm.yml site.yml --vault-password-file .vault; then | |
echo "Ansible failed!" | |
rm .vault | |
exit 1 | |
else | |
rm .vault | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment