roles/deadswitch: role is now idempotent

This commit is contained in:
2023-01-18 01:10:40 -06:00
parent 1747125b67
commit 5cdc63e35a
2 changed files with 14 additions and 3 deletions

View File

@@ -22,11 +22,17 @@
dest: /root/deadman/dead.patch
mode: u+rw
# TODO: make idempotent
# TODO: deadtrigger path should be a variable, no?
- name: Check deadtrigger
stat:
path: /root/.deadtrigger
register: deadstat
- name: Install deadtrigger
file:
name: /root/.deadtrigger
path: /root/.deadtrigger
state: touch
when: deadstat.stat.exists == false
# Run deadswitch daily at 1am
- name: Install deadlock cronjob