diff --git a/roles/watchdog/files/load-wdt.service b/roles/watchdog/files/load-wdt.service new file mode 100644 index 0000000..7242e4d --- /dev/null +++ b/roles/watchdog/files/load-wdt.service @@ -0,0 +1,8 @@ + +[Service] +Type=oneshot +RemainAfterExit=True +ExecStart=/sbin/modprobe iTCO_wdt + +[Install] +WantedBy=multi-user.target diff --git a/roles/watchdog/handlers/main.yml b/roles/watchdog/handlers/main.yml new file mode 100644 index 0000000..8a13bc3 --- /dev/null +++ b/roles/watchdog/handlers/main.yml @@ -0,0 +1,3 @@ +- name: reload systemd + systemd: + daemon_reload: yes diff --git a/roles/watchdog/tasks/main.yml b/roles/watchdog/tasks/main.yml new file mode 100644 index 0000000..10624cd --- /dev/null +++ b/roles/watchdog/tasks/main.yml @@ -0,0 +1,21 @@ +- name: install load-wdt systemd service + copy: + src: load-wdt.service + dest: /etc/systemd/system/load-wdt.service + owner: root + group: root + mode: 0644 + notify: reload systemd + +- name: enable load-wdt systemd service + systemd: + state: started + enabled: yes + name: load-wdt + +- name: configure systemd watchdog + lineinfile: + path: /etc/systemd/system.conf + regexp: '\bRuntimeWatchdogSec\b' + line: "RuntimeWatchdogSec=5min" + notify: reload systemd diff --git a/watchdog.yml b/watchdog.yml new file mode 100644 index 0000000..ce1398b --- /dev/null +++ b/watchdog.yml @@ -0,0 +1,5 @@ +- hosts: + - ange.kde.org + + roles: + - watchdog