https://github.com/jpmens/ansible-ntfy
Ansible action plugin to post JSON messages to nfty
https://github.com/jpmens/ansible-ntfy
ansible module notification ntfy plugin
Last synced: 7 months ago
JSON representation
Ansible action plugin to post JSON messages to nfty
- Host: GitHub
- URL: https://github.com/jpmens/ansible-ntfy
- Owner: jpmens
- Created: 2022-10-29T09:26:45.000Z (almost 3 years ago)
- Default Branch: trunk
- Last Pushed: 2024-05-25T06:36:47.000Z (over 1 year ago)
- Last Synced: 2025-03-08T19:38:15.854Z (8 months ago)
- Topics: ansible, module, notification, ntfy, plugin
- Language: Python
- Homepage: https://jpmens.net/2022/10/30/a-nifty-push-notification-system-ntfy/
- Size: 61.5 KB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### nfty Ansible action plugin
`nfty` is an Ansible action plugin to post JSON messages to [nfty] and similar HTTP endpoints. The [nfty server][1] is open source.

Consider the following playbook which created the two notifications above:
```yaml
- hosts: alice
vars:
topic: "admin-alerts"
tasks:
- name: "Notify ntfy that we're done (topic obtained from play var)"
ntfy:
msg: "deployment on {{ inventory_hostname }} is complete. 🐄 "
- name: "different topic"
ntfy:
msg: "that's a wrap"
topic: "admin-alerts"
attrs:
tags: [ rotating_light, heavy_check_mark ]
priority: 4
actions:
- action: view
label: "Open Mastodon"
url: "https://mastodon.social/@jpmens"
```
[nfty]: https://ntfy.sh
[1]: https://github.com/binwiederhier/ntfy