mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2026-02-08 02:40:04 +00:00
switched to roles
- all tasks/* have been moved to their own roles in roles/* - each file && template is now oragnized per-role - annotated each task which still isn't idempotent !TODO!
This commit is contained in:
37
roles/deadswitch/tasks/main.yml
Normal file
37
roles/deadswitch/tasks/main.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- name: Create deadman directory
|
||||
file:
|
||||
name: /root/deadman
|
||||
state: directory
|
||||
|
||||
- name: Install deadswitch script
|
||||
copy:
|
||||
src: deadswitch
|
||||
dest: /usr/local/bin/deadswitch
|
||||
mode: u+rx
|
||||
|
||||
- name: Install imdead.sh
|
||||
copy:
|
||||
src: imdead.sh
|
||||
dest: /root/deadman/imdead.sh
|
||||
mode: u+rx
|
||||
|
||||
- name: Copy dead patch
|
||||
copy:
|
||||
src: secrets/dead.patch
|
||||
dest: /root/deadman/dead.patch
|
||||
mode: u+rw
|
||||
|
||||
# TODO: make idempotent
|
||||
- name: Install deadtrigger
|
||||
file:
|
||||
name: /root/.deadtrigger
|
||||
state: touch
|
||||
|
||||
# Run deadswitch daily at 1am
|
||||
- name: Install deadlock cronjob
|
||||
cron:
|
||||
name: Run deadswitch
|
||||
minute: 0
|
||||
hour: 1
|
||||
job: /usr/local/bin/deadswitch
|
||||
Reference in New Issue
Block a user