bundles/cron: add

This commit is contained in:
Franzi 2020-06-01 11:54:28 +02:00
parent f0d962ab04
commit 2a6547dfb7
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 15 additions and 0 deletions

6
bundles/cron/items.py Normal file
View file

@ -0,0 +1,6 @@
files = {}
for crontab, content in node.metadata.get('cron', {}).items():
files['/etc/cron.d/{}'.format(crontab)] = {
'content': content + "\n",
}

View file

@ -0,0 +1,8 @@
@metadata_processor
def crontab(metadata):
return {
'cron': {
'letsencrypt_renew': '20 4 * * * root /usr/bin/dehydrated --cron --accept-terms --ocsp --challenge http-01 > /dev/null',
'letsencrypt_cleanup': '42 23 * * 0 root /usr/bin/dehydrated --cleanup > /dev/null',
},
}, DEFAULTS, DONE

View file

@ -4,6 +4,7 @@ groups['all'] = {
),
'bundles': {
'apt',
'cron',
'hostname',
'sudo',
'systemd',