bundles/cron: add
This commit is contained in:
parent
f0d962ab04
commit
2a6547dfb7
3 changed files with 15 additions and 0 deletions
6
bundles/cron/items.py
Normal file
6
bundles/cron/items.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
files = {}
|
||||
|
||||
for crontab, content in node.metadata.get('cron', {}).items():
|
||||
files['/etc/cron.d/{}'.format(crontab)] = {
|
||||
'content': content + "\n",
|
||||
}
|
8
bundles/letsencrypt/metadata.py
Normal file
8
bundles/letsencrypt/metadata.py
Normal 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
|
|
@ -4,6 +4,7 @@ groups['all'] = {
|
|||
),
|
||||
'bundles': {
|
||||
'apt',
|
||||
'cron',
|
||||
'hostname',
|
||||
'sudo',
|
||||
'systemd',
|
||||
|
|
Loading…
Reference in a new issue