From 147774761b44530d67175160a7e7459f39d3cb71 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Sun, 30 Oct 2022 09:34:21 +0100 Subject: [PATCH] Add ansible-ntfy to Ansible section --- docs/examples.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/examples.md b/docs/examples.md index 08ac454b..7db9220c 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -109,6 +109,19 @@ One of my co-workers uses the following Ansible task to let him know when things body: "{{ inventory_hostname }} reseeding complete" ``` +There's also a dedicated Ansible action plugin (one which runs on the Ansible controller) called +[ansible-ntfy](https://github.com/jpmens/ansible-ntfy). The following task posts a message +to ntfy at its default URL (`attrs` and other attributes are optional): + +```yml +- name: "Notify ntfy that we're done" + ntfy: + msg: "deployment on {{ inventory_hostname }} is complete. 🐄" + attrs: + tags: [ heavy_check_mark ] + priority: 1 +``` + ## Watchtower (shoutrrr) You can use [shoutrrr](https://github.com/containrrr/shoutrrr) generic webhook support to send [Watchtower](https://github.com/containrrr/watchtower/) notifications to your ntfy topic.