Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 975 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 975 Bytes

nfty Ansible action plugin

nfty is an Ansible action plugin to post JSON messages to nfty and similar HTTP endpoints. The nfty server is open source.

nfty Web interface in action

Consider the following playbook which created the two notifications above:

- 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"