Add daily/weekly systemd timer setup
This commit is contained in:
parent
0e78c4a642
commit
636019283f
7 changed files with 104 additions and 2 deletions
9
roles/arch/templates/timer/daily_target.j2
Normal file
9
roles/arch/templates/timer/daily_target.j2
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
# Add the following to your service unit to make use of this target:
|
||||
# Wants=daily.target
|
||||
#
|
||||
# Or symlink the unit file to the daily.target.wants directory manually
|
||||
[Unit]
|
||||
Description=Daily timer target
|
||||
Requires=multi-user.target
|
||||
12
roles/arch/templates/timer/daily_timer.j2
Normal file
12
roles/arch/templates/timer/daily_timer.j2
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
[Unit]
|
||||
Description=Timer which runs all services on a daily basis inside the daily.target.wants directory
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Unit=daily.target
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
10
roles/arch/templates/timer/weekly_target.j2
Normal file
10
roles/arch/templates/timer/weekly_target.j2
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
# Add the following to your service unit to make use of this target:
|
||||
# Wants=weekly.target
|
||||
#
|
||||
# Or symlink the unit file to the weekly.target.wants directory manually
|
||||
|
||||
[Unit]
|
||||
Description=Weekly timer target
|
||||
Requires=multi-user.target
|
||||
12
roles/arch/templates/timer/weekly_timer.j2
Normal file
12
roles/arch/templates/timer/weekly_timer.j2
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
[Unit]
|
||||
Description=Timer which runs all services on a weekly basis inside the weekly.target.wants directory
|
||||
|
||||
[Timer]
|
||||
OnCalendar=weekly
|
||||
Unit=weekly.target
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue