Skip to content

adding notification to monitor task #42

@gabriel-blankenship

Description

@gabriel-blankenship

Trying to figure out how to add a notification to a particular monitor task in ansible so that it can all be generated at the same time. Any ideas?

An example task I'm working on:

 - name: Add SSL check for all domain certificates
   lucasheld.uptime_kuma.monitor:
     api_url: "{{ kuma_api_url }}"
     api_token: "{{ api_token }}"
     name: "SSL Verify: {{ item }}"
     url: https://{{ item }}
     type: http
     expiryNotification: true
     state: present
     interval: 86400
   tags:
     - kuma_monitors

I want to create a slack notification via a webhook. Does the slack notification need to be created first and register the output to grab an id from it and then add that to the above task? Going to try and test via this documentation https://github.com/lucasheld/ansible-uptime-kuma/wiki/monitor_info with notificationIDList that currently is the only thing I'm seeing that might be the route I should be taking.

I plan to add a debug task after the notification task is ran to see if it gives me an id, if so then will add that to a task via the notificationIDList.

I also posted this question here sorry if this doesn't exactly fit here but wasn't sure where else I could post and get a response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions