2020-11-09 18:22:41 +01:00
|
|
|
files = {
|
|
|
|
'/etc/crontab': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': {
|
|
|
|
'min': (node.magic_number%60),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2020-06-01 11:54:28 +02:00
|
|
|
|
2020-08-30 11:14:10 +02:00
|
|
|
directories = {
|
|
|
|
'/etc/cron.d': {
|
|
|
|
'purge': True,
|
2020-10-25 16:39:35 +01:00
|
|
|
'needs': {
|
|
|
|
'pkg_apt:',
|
|
|
|
},
|
2020-08-30 11:14:10 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2020-06-01 11:54:28 +02:00
|
|
|
for crontab, content in node.metadata.get('cron', {}).items():
|
|
|
|
files['/etc/cron.d/{}'.format(crontab)] = {
|
2020-11-09 18:22:41 +01:00
|
|
|
'source': 'cron_template',
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': {
|
|
|
|
'cron': content,
|
|
|
|
}
|
2020-06-01 11:54:28 +02:00
|
|
|
}
|