M roles/ntfy_server/README.md => roles/ntfy_server/README.md +7 -1
@@ 1,4 1,10 @@
-A user needs to be manually created: `ntfy user add --role=admin xenrox`
+Users need to be manually created:
+
+```
+ntfy user add --role=admin xenrox
+ntfy user add infrastructure
+ntfy access infrastructure infrastructure write-only
+```
Check access control:
M roles/ntfy_server/tasks/main.yml => roles/ntfy_server/tasks/main.yml +5 -0
@@ 33,6 33,7 @@
name: ntfy.service
enabled: true
state: started
+ register: ntfy_status
- name: Copy nginx conf
ansible.builtin.copy:
@@ 42,3 43,7 @@
group: root
mode: 0644
notify: restart nginx
+
+- name: Make UnifiedPush topics world-writeable
+ ansible.builtin.command: ntfy access everyone 'up*' write-only
+ when: ntfy_status.changed