bundles/netbox: move housekeeping to systemd timers

This commit is contained in:
Franzi 2022-02-06 13:40:33 +01:00
parent 0599c4dae0
commit 0674b3f8db
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -21,14 +21,6 @@ defaults = {
# and database
},
},
'cron': {
'jobs': {
'netbox': '{m} {h} * * * netbox /opt/netbox/venv/bin/python /opt/netbox/src/netbox/manage.py housekeeping'.format(
m=node.magic_number%60,
h=node.magic_number%4,
),
},
},
'postgresql': {
'databases': {
'netbox': {
@ -41,6 +33,16 @@ defaults = {
},
},
},
'systemd-timers': {
'timers': {
'netbox_housekeeping': {
'command': '/opt/netbox/venv/bin/python /opt/netbox/src/netbox/manage.py housekeeping',
'pwd': '/opt/netbox',
'user': 'netbox',
'when': 'daily',
}
},
},
'zfs': {
'datasets': {
'tank/netbox': {},