initial git commit
commit
ede3979533
@ -0,0 +1 @@
|
||||
- include: systemd-daemon-reload.yml
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: systemd-daemon-reload
|
||||
shell: systemctl daemon-reload
|
@ -0,0 +1,12 @@
|
||||
- template:
|
||||
src=touch-file.service.j2
|
||||
dest=/etc/systemd/system/touch-file-{{ file|replace('/', '-') }}.service
|
||||
notify: systemd-daemon-reload
|
||||
|
||||
- template:
|
||||
src=touch-file.timer.j2
|
||||
dest=/etc/systemd/system/touch-file-{{ file|replace('/', '-') }}.timer
|
||||
notify: systemd-daemon-reload
|
||||
|
||||
- service:
|
||||
name=touch-file-{{ file|replace('/', '-') }}.timer state=started enabled=yes
|
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Touch {{ file }}
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User={{ user }}
|
||||
ExecStart=/usr/bin/touch {{ file }}
|
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Touch {{ file }} regularly
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
AccuracySec=30m
|
||||
Persistent=true
|
||||
Unit=touch-file-{{ file | replace('/', '-') }}.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
Reference in New Issue