feat(ntfy): added server & client config
This commit is contained in:
parent
b1d70248f1
commit
a05cbf9a6f
14 changed files with 577 additions and 31 deletions
50
roles/ntfy-server/tasks/main.yml
Normal file
50
roles/ntfy-server/tasks/main.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
- name: Ensure system group exists
|
||||
ansible.builtin.group:
|
||||
name: 'ntfy'
|
||||
gid: 203
|
||||
system: true
|
||||
state: present
|
||||
|
||||
- name: Ensure system user exists
|
||||
ansible.builtin.user:
|
||||
name: 'ntfy'
|
||||
group: 'ntfy'
|
||||
uid: 203
|
||||
system: true
|
||||
create_home: false
|
||||
|
||||
- name: Ensure data subvolume is present
|
||||
community.general.btrfs_subvolume:
|
||||
name: '/ntfy'
|
||||
|
||||
- name: Ensure data subvolume permissions are correct
|
||||
ansible.builtin.file:
|
||||
path: '/mnt/data1/ntfy'
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: 'ntfy'
|
||||
group: 'ntfy'
|
||||
|
||||
- name: Ensure attachment directory is present
|
||||
ansible.builtin.file:
|
||||
path: '/mnt/data1/ntfy/attachments'
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: 'ntfy'
|
||||
group: 'ntfy'
|
||||
|
||||
- name: Ensure server config file is present
|
||||
ansible.builtin.copy:
|
||||
src: 'server.yml'
|
||||
dest: '/etc/ntfy/server.yml'
|
||||
mode: '0644'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
notify: 'ntfy-restart'
|
||||
|
||||
- name: Ensure service is running & enabled
|
||||
service:
|
||||
name: ntfy
|
||||
state: started
|
||||
enabled: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue