diff --git a/reboot.yaml b/reboot.yaml index 300eac3..4a19fb1 100644 --- a/reboot.yaml +++ b/reboot.yaml @@ -1,5 +1,6 @@ --- - hosts: all,!ansible-hosts + gather_facts: no tasks: - name: reboot become: yes diff --git a/roles/common/files/proc_check.sh b/roles/common/files/proc_check.sh new file mode 100644 index 0000000..ead18ce --- /dev/null +++ b/roles/common/files/proc_check.sh @@ -0,0 +1,6 @@ +#!/bin/bash +/usr/bin/killall chromium-browser +/usr/bin/killall chromium-browser +/usr/bin/killall chromium-browser +systemctl restart ntopng + diff --git a/roles/common/tasks/main.yaml b/roles/common/tasks/main.yaml index c214e74..8b7b459 100644 --- a/roles/common/tasks/main.yaml +++ b/roles/common/tasks/main.yaml @@ -72,6 +72,20 @@ # become: yes #- name: set keyboard to us # command: raspi-config nonint do_configure_keyboard us +- name: copy proc_check script and set exec + template: + src: "{{ role_path }}/files/proc_check.sh" + dest: /home/pi/scripts/proc_check.sh + owner: pi + group: pi + mode: a+x +- name: schedule proc_check script to run at 12:30am + cron: + name: "prock_check" + minute: "30" + hour: "0" + weekday: "*" + job: /home/pi/scripts/proc_check.sh - name: pi become: yes user: