Skip to content

Instantly share code, notes, and snippets.

@nmartins0611
Created August 22, 2023 09:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Basic Notification to MatterMost
## example
---
- name: Send notification message via Mattermost
community.general.mattermost:
url: ## Add URL
api_key: ## Add Token
attachments:
- text: "!!!!!! ALERT !!!!!!"
color: '#ff00dd'
title: BGP ERROR
fields:
- title: Issue
value: "BGP {{ ansible_eda.event.fields.session_state }} Error!"
short: true
- title: Details
value: "Neighbor Address: {{ ansible_eda.event.tags.neighbor_address }} from switch {{ ansible_eda.event.name }}"
short: true
delegate_to: localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment