bundlewrap/bundles/cron/items.py

35 lines
620 B
Python
Raw Normal View History

files = {
'/etc/crontab': {
'content_type': 'mako',
'context': {
'min': (node.magic_number%60),
},
},
}
2020-06-01 09:54:28 +00:00
directories = {
'/etc/cron.d': {
'purge': True,
2023-07-13 18:19:17 +00:00
'after': {
2020-10-25 15:39:35 +00:00
'pkg_apt:',
},
},
}
svc_systemd = {
2025-01-06 19:12:06 +00:00
'cron': {
'needs': {
2025-01-06 19:12:06 +00:00
'pkg_apt:cron',
},
},
}
for crontab, content in node.metadata.get('cron/jobs', {}).items():
2020-06-01 09:54:28 +00:00
files['/etc/cron.d/{}'.format(crontab)] = {
'source': 'cron_template',
'content_type': 'mako',
'context': {
'cron': content,
}
2020-06-01 09:54:28 +00:00
}