ansible-role-ntfy/tasks/main.yml

30 lines
661 B
YAML
Raw Normal View History

---
- name: Install ntfy (Debian)
import_tasks: Debian.yml
when: ansible_os_family == 'Debian'
- name: Install ntfy (non-Debian)
ansible.builtin.package:
name: ntfy
state: present
when: ansible_os_family != 'Debian'
2023-05-25 21:13:15 +00:00
- name: Ensure directory for ntfy domain sockets
ansible.builtin.file:
path: /var/lib/ntfy
2023-05-25 21:13:15 +00:00
state: directory
owner: ntfy
group: ntfy
mode: '0755'
- name: Ensure ntfy is enabled on boot
ansible.builtin.service:
name: ntfy
enabled: true
state: started
- name: Update /etc/ntfy/server.yml
ansible.builtin.template:
src: server.yml.j2
dest: /etc/ntfy/server.yml
notify: restart ntfy