feat(ntfy): added server & client config

This commit is contained in:
Jef Roosens 2024-01-20 12:57:03 +01:00
parent b1d70248f1
commit a05cbf9a6f
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
14 changed files with 577 additions and 31 deletions

32
roles/ntfy/tasks/main.yml Normal file
View file

@ -0,0 +1,32 @@
---
- name: Ensure repository GPG key is present
ansible.builtin.apt_key:
url: 'https://archive.heckel.io/apt/pubkey.txt'
state: present
- name: Ensure Apt repository is present
apt_repository:
repo: 'deb [arch=arm64] https://archive.heckel.io/apt debian main'
filename: ntfy
state: present
- name: Ensure ntfy is installed
apt:
name: ntfy
state: present
- name: Ensure configuration directory is present
ansible.builtin.file:
path: '/etc/ntfy'
state: directory
mode: '0755'
owner: 'root'
group: 'root'
- name: Ensure client config file is present
ansible.builtin.template:
src: 'client.yml.j2'
dest: '/etc/ntfy/client.yml'
mode: '0644'
owner: 'root'
group: 'root'