initial commit
This commit is contained in:
commit
13eace9ce9
219 files changed
+6918
No files matched your search
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: restart ntfy
|
||||
ansible.builtin.systemd:
|
||||
name: ntfy
|
||||
state: restarted
|
||||
enabled: true
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: install ntfy
|
||||
ansible.builtin.apt:
|
||||
name: ntfy
|
||||
state: latest
|
||||
update_cache: true
|
||||
notify: restart ntfy
|
||||
|
||||
- name: set ntfy data directory ownership
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/ntfy
|
||||
state: directory
|
||||
owner: _ntfy
|
||||
group: _ntfy
|
||||
mode: '0750'
|
||||
recurse: true
|
||||
|
||||
- name: deploy ntfy config
|
||||
ansible.builtin.template:
|
||||
src: "{{ inventory_hostname }}/server.yml.j2"
|
||||
dest: "/etc/ntfy/server.yml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
notify: restart ntfy
|
||||
@@ -0,0 +1,24 @@
|
||||
base-url: "https://{{ dnsmasq[0].name }}"
|
||||
database-url: "postgres://ntfy:{{ database_password | urlencode }}@{{ hostvars['pgsql'].ip }}:5432/ntfy"
|
||||
listen-http: ":2586"
|
||||
cache-duration: "24h"
|
||||
attachment-cache-dir: "/var/lib/ntfy/"
|
||||
attachment-total-size-limit: "500M"
|
||||
attachment-file-size-limit: "15M"
|
||||
attachment-expiry-duration: "12h"
|
||||
auth-default-access: "deny-all"
|
||||
auth-users:
|
||||
{% for user in ntfy_auth_users %}
|
||||
- "{{ user.name }}:{{ user.hash }}:{{ user.role }}"
|
||||
{% endfor %}
|
||||
auth-tokens:
|
||||
{% for token in ntfy_auth_tokens %}
|
||||
- "{{ token.name }}:{{ token.token }}"
|
||||
{% endfor %}
|
||||
auth-access:
|
||||
{% for access in ntfy_auth_access %}
|
||||
- "{{ access.name }}:{{ access.topic }}:{{ access.access }}"
|
||||
{% endfor %}
|
||||
enable-login: true
|
||||
behind-proxy: true
|
||||
web-root: disable
|
||||
Reference in new issue
Block a user