This commit is contained in:
parent
d75cc12335
commit
75a94c9ac3
|
@ -14,3 +14,18 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
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
|
||||||
|
|
|
@ -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 }}'
|
Loading…
Reference in New Issue