configpolicy/roles/journal2ntfy/tasks/main.yml

52 lines
972 B
YAML

- name: ensure journal2ntfy script is installed
copy:
src: journal2ntfy.py
dest: /usr/local/bin/journal2ntfy
owner: root
group: root
mode: u=rwx,go=rx
notify:
- restart journal2ntfy
tags:
- install
- name: ensure journal2ntfy.service systemd unit is installed
copy:
src: journal2ntfy.service
dest: /etc/systemd/system/journal2ntfy.service
owner: root
group: root
mode: u=rw,go=r
notify:
- restart journal2ntfy
tags:
- systemd
- name: ensure journal2ntfy is configured
template:
src: journal2ntfy.env.j2
dest: /etc/sysconfig/journal2ntfy
owner: root
group: root
mode: u=rw,go=r
notify:
- restart journal2ntfy
tags:
- config
- name: ensure journal2ntfy service is enabled
service:
name: journal2ntfy
enabled: true
tags:
- service
- meta: flush_handlers
- name: ensure journal2ntfy is running
service:
name: journal2ntfy
state: started
tags:
- service