Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing playbook in tower should alert slack or send email that it failed #5820

Closed
1 task done
christinach opened this issue Feb 5, 2025 · 5 comments · May be fixed by #5833
Closed
1 task done

Failing playbook in tower should alert slack or send email that it failed #5820

christinach opened this issue Feb 5, 2025 · 5 comments · May be fixed by #5833
Assignees
Labels
maintenance Operations pulls issues into the Operations ZenHub board

Comments

@christinach
Copy link
Member

christinach commented Feb 5, 2025

Maintenance

We have scheduled various playbooks to run in tower.
When a playbook fails to finish there is an output error in AnsibleTower but nothing in Slack to indicate that it failed.

Acceptance Criteria

  • Send an alert in slack or an email that the playbook has failed
@kevinreiss
Copy link
Member

kevinreiss commented Feb 14, 2025

Some structural issues to having this happen consistently. You can only report failures when you Rescue an error from a block and all our playbooks don't use this pattern consistently. See if we can group roles into a task block, where we can use built-in rescue handling at the playbook level.

@acozine
Copy link
Contributor

acozine commented Feb 14, 2025

Tower has the concept of alerts for jobs - we might be able to use that instead of changing the playbooks. See https://docs.ansible.com/ansible-tower/latest/html/userguide/notifications.html. I'm happy to pair with someone to try and get this done.

@acozine acozine added the Operations pulls issues into the Operations ZenHub board label Feb 14, 2025
@christinach
Copy link
Member Author

@acozine and I looked into adding notification in tower when a job fails. The email notification that @acozine had already tested is working. The slack notification needs some more investigation. For now I’m adding our team’s emails in the DACS email notifications.

@christinach christinach changed the title Failing playbook in tower should alert slack that it failed Failing playbook in tower should alert slack or send email that it failed Feb 28, 2025
@christinach
Copy link
Member Author

notifications are sent through email
DACS email notification template

@christinach
Copy link
Member Author

@acozine setup successfully the integration in slack so we can receive alerts in slack.
I've edited the scheduled jobs to use Notify #dacs-monitors template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Operations pulls issues into the Operations ZenHub board
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants