Skip to content

Instantly share code, notes, and snippets.

@duffney
Created July 26, 2020 10:10
Show Gist options
  • Save duffney/45123253c54508c81a401533877b75ee to your computer and use it in GitHub Desktop.
Save duffney/45123253c54508c81a401533877b75ee to your computer and use it in GitHub Desktop.
Ansible entrypoint.sh using if statement to throw on failure
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