]> git.somenet.org - root/pub/somesible.git/blob - roles/base/ansible/autoselfheal/files/default/ansible_autoselfheal.service
[roles/base/ansible/autoselfheal] Setup automatic/periodic selfhealing
[root/pub/somesible.git] / roles / base / ansible / autoselfheal / files / default / ansible_autoselfheal.service
1 #
2 ################################################
3 ### Managed by someone's ansible provisioner ###
4 ################################################
5 # Part of: https://git.somenet.org/root/pub/somesible.git
6 # 2017-2024 by someone <someone@somenet.org>
7 #
8
9 [Unit]
10 Description=Ansible autoselfheal
11 ConditionPathIsDirectory=/var/ansible/ansible
12 OnFailure=unit-status-mail@%n.service
13
14 [Service]
15 Type=oneshot
16 User=ansible
17 Group=root
18 TimeoutStartSec=2h
19 WorkingDirectory=/var/ansible/ansible
20 ExecStart=/bin/bash -c 'set -o pipefail; sleep 120; ./run_somesible.sh -D -e ignore_online_errors=True 2>&1 | tee -a /var/log/ansible_autoselfheal.log; exit $?'