bundles/cron: use MAILTO=, rework metadata syntax

This commit is contained in:
Franzi 2022-02-05 11:41:41 +01:00
parent 533f8075ca
commit 0d865c93d4
Signed by: kunsi
GPG key ID: 12E3D2136B818350
22 changed files with 113 additions and 65 deletions

View file

@ -10,7 +10,7 @@ defaults = {
@metadata_reactor.provides(
'cron/backup',
'cron/jobs/backup',
'icinga2_api/backup-client/services',
)
def cron(metadata):
@ -19,11 +19,13 @@ def cron(metadata):
return {
'cron': {
'jobs': {
# spread backups between 00:00 and 04:59 UTC
'backup': '{} {} * * * root /usr/local/bin/generate-backup-with-retries'.format(
(node.magic_number % 60),
(node.magic_number % 4),
),
'backup': '{} {} * * * root /usr/local/bin/generate-backup-with-retries'.format(
(node.magic_number % 60),
(node.magic_number % 4),
),
},
},
'icinga2_api': {
'backup-client': {