bundles/c3voc-addons: support cron definition
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
0893156723
commit
63cdd470cf
3 changed files with 26 additions and 6 deletions
|
@ -62,14 +62,17 @@ files = {
|
|||
'data': node.metadata.get('apt', {}).get('unattended-upgrades', {}),
|
||||
}
|
||||
},
|
||||
'/etc/cron.d/upgrade-and-reboot': {
|
||||
'content': '{minute} 1 * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
||||
minute=node.magic_number % 30,
|
||||
day=node.metadata.get('apt', {}).get('unattended-upgrades', {}).get('day', 5),
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
for crontab, content in node.metadata.get('cron', {}).items():
|
||||
files['/etc/cron.d/{}'.format(crontab)] = {
|
||||
'source': 'cron_template',
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'cron': content,
|
||||
}
|
||||
}
|
||||
|
||||
for vhost, config in node.metadata.get('nginx', {}).get('vhosts', {}).items():
|
||||
if not 'domain' in config:
|
||||
config['domain'] = vhost
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue