From 1d4d3e445bc04b73e35e1d6034b5a38ad2081906 Mon Sep 17 00:00:00 2001 From: Brian Lee Date: Wed, 5 Jul 2023 14:38:38 -0700 Subject: [PATCH] Change default unix socket path to something more long-lived. --- README.md | 4 +++- defaults/main.yml | 5 +++-- tasks/main.yml | 2 +- templates/server.yml.j2 | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9d464f8..6cc2ccf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Ansible Role: ntfy -This Ansible Role installs [ntfy](https://github.com/binwiederhier/ntfy). +This Ansible Role installs binwiederhier's [ntfy](https://github.com/binwiederhier/ntfy). + +Related role: [ansible-role-ntfy-alertmanager](https://github.com/bleetube/ansible-role-ntfy-alertmanager) for xenrox's ntfy-alertmanager integration. ## Requirements diff --git a/defaults/main.yml b/defaults/main.yml index 97a5368..6f4f9f0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,5 +4,6 @@ ntfy_listen_http: ":80" ntfy_cache_file: /var/cache/ntfy/cache.db ntfy_behind_proxy: 'true' ntfy_attachment_cache_dir: /var/cache/ntfy/attachments -ntfy_listen_unix: /run/ntfy/ntfy.sock -ntfy_listen_unix_mode: '0666' \ No newline at end of file +ntfy_listen_unix: /var/lib/ntfy/ntfy.sock +ntfy_listen_unix_mode: '0666' +ntfy_web_root: / \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index fda25d5..6de0600 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,7 +11,7 @@ - name: Ensure directory for ntfy domain sockets ansible.builtin.file: - path: /var/run/ntfy + path: /var/lib/ntfy state: directory owner: ntfy group: ntfy diff --git a/templates/server.yml.j2 b/templates/server.yml.j2 index fe408a3..03231bd 100644 --- a/templates/server.yml.j2 +++ b/templates/server.yml.j2 @@ -185,7 +185,7 @@ attachment-cache-dir: "{{ ntfy_attachment_cache_dir }}" # the values "app" (maps to "/"), "home" (maps to "/app"), or "disable" (maps to "") to disable # the web app entirely. # -# web-root: / +web-root: {{ ntfy_web_root }} # Various feature flags used to control the web app, and API access, mainly around user and # account management.