bundles/cron: use MAILTO=, rework metadata syntax
This commit is contained in:
parent
533f8075ca
commit
0d865c93d4
22 changed files with 113 additions and 65 deletions
|
@ -91,7 +91,7 @@ files = {
|
|||
},
|
||||
}
|
||||
|
||||
for crontab, content in node.metadata.get('cron', {}).items():
|
||||
for crontab, content in node.metadata.get('cron/jobs', {}).items():
|
||||
files['/etc/cron.d/{}'.format(crontab)] = {
|
||||
'source': 'cron_template',
|
||||
'content_type': 'mako',
|
||||
|
|
|
@ -33,11 +33,13 @@ def patchday(metadata):
|
|||
|
||||
return {
|
||||
'cron': {
|
||||
'upgrade-and-reboot': '{minute} {hour} * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
||||
minute=node.magic_number % 30,
|
||||
hour=hour,
|
||||
day=day,
|
||||
),
|
||||
'jobs': {
|
||||
'upgrade-and-reboot': '{minute} {hour} * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
||||
minute=node.magic_number % 30,
|
||||
hour=hour,
|
||||
day=day,
|
||||
),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue