- add proc_chec - kills off extraneous chrome processes and restarts ntopng
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: all,!ansible-hosts
|
- hosts: all,!ansible-hosts
|
||||||
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- name: reboot
|
- name: reboot
|
||||||
become: yes
|
become: yes
|
||||||
|
|||||||
6
roles/common/files/proc_check.sh
Normal file
6
roles/common/files/proc_check.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
/usr/bin/killall chromium-browser
|
||||||
|
/usr/bin/killall chromium-browser
|
||||||
|
/usr/bin/killall chromium-browser
|
||||||
|
systemctl restart ntopng
|
||||||
|
|
||||||
@@ -72,6 +72,20 @@
|
|||||||
# become: yes
|
# become: yes
|
||||||
#- name: set keyboard to us
|
#- name: set keyboard to us
|
||||||
# command: raspi-config nonint do_configure_keyboard 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
|
- name: pi
|
||||||
become: yes
|
become: yes
|
||||||
user:
|
user:
|
||||||
|
|||||||
Reference in New Issue
Block a user