bundles/cron: provide some environment, also manage /etc/crontab
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-09 18:22:41 +01:00
parent 1ffe8bd23e
commit 67386d9efa
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 50 additions and 2 deletions

View file

@ -1,4 +1,11 @@
files = {}
files = {
'/etc/crontab': {
'content_type': 'mako',
'context': {
'min': (node.magic_number%60),
},
},
}
directories = {
'/etc/cron.d': {
@ -11,5 +18,9 @@ directories = {
for crontab, content in node.metadata.get('cron', {}).items():
files['/etc/cron.d/{}'.format(crontab)] = {
'content': content + "\n",
'source': 'cron_template',
'content_type': 'mako',
'context': {
'cron': content,
}
}