Browse Source

Refactored the touch alert to own role.

I did this because i want to use it on interactive and login.
pull/7/head
Egon Rijpkema 4 years ago
parent
commit
f37aedf6ff
  1. 1
      interactive.yml
  2. 1
      login.yml
  3. 18
      roles/interactive/tasks/main.yml
  4. 0
      roles/touchalert/files/touch_alert
  5. 18
      roles/touchalert/tasks/main.yml

1
interactive.yml

@ -4,3 +4,4 @@ @@ -4,3 +4,4 @@
roles:
- interactive
- common
- touchalert

1
login.yml

@ -3,3 +3,4 @@ @@ -3,3 +3,4 @@
become: True
roles:
- common
- touchalert

18
roles/interactive/tasks/main.yml

@ -11,21 +11,3 @@ @@ -11,21 +11,3 @@
user: root
job: '/usr/bin/timeout 3600 find /scratch/* -atime +30 -type f -delete -print 2>&1 | $(logger -t purge_scratch)'
cron_file: purge_scratch
- name: Install find_touch_alert script
copy:
src: 'files/touch_alert'
dest: /sbin/touch_alert
mode: 0700
- cron:
name: Alert when someone is running find to update the mtime of files.
minute: '*'
user: root
job: '/sbin/touch_alert'
cron_file: touch_alert
- cronvar:
name: MAILTO
value: e.m.a.rijpkema@rug.nl
cron_file: touch_alert

0
roles/interactive/files/touch_alert → roles/touchalert/files/touch_alert

18
roles/touchalert/tasks/main.yml

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
---
- name: Install find_touch_alert script
copy:
src: 'files/touch_alert'
dest: /sbin/touch_alert
mode: 0700
- cron:
name: Alert when someone is running find to update the mtime of files.
minute: '*'
user: root
job: '/sbin/touch_alert'
cron_file: touch_alert
- cronvar:
name: MAILTO
value: e.m.a.rijpkema@rug.nl
cron_file: touch_alert
Loading…
Cancel
Save