This commit is contained in:
Michael Grote 2022-04-01 18:23:01 +02:00
parent d75cc12335
commit 75a94c9ac3
2 changed files with 23 additions and 0 deletions

View file

@ -14,3 +14,18 @@
owner: root
group: root
mode: 0644
- name: Generate Sanoid Configuration
become: true
community.general.ini_file:
path: "/ets/systemd/system/{{ item }}"
section: Unit
state: present
exclusive: no
no_extra_spaces: no
option: OnFailure
value: sanoid_mail.service
loop:
- sanoid.service
- sanoid-prune.service

View file

@ -0,0 +1,8 @@
{{ file_header | default () }}
[Unit]
Description=Send a Mail in case of an error in sanoid.service.
[Service]
Type=oneshot
ExecStart=/bin/bash -c '/bin/systemctl status sanoid.service | mail -s "[ERROR] sanoid - %H" {{ empfaenger_mail }}'