bundlewrap/bundles/letsencrypt/items.py
Franziska Kunsmann 5f804ca3be
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/letsencrypt: add metadata to reload certificates and services
2020-06-01 12:33:25 +02:00

29 lines
638 B
Python

assert node.has_bundle('nginx'), 'letsencrypt needs nginx'
pkg_apt = {
'dehydrated': {},
}
actions = {
'letsencrypt_update_certificates': {
'command': 'dehydrated --cron --accept-terms --ocsp --challenge http-01',
'triggered': True,
'needs': {
'pkg_apt:dehydrated',
},
},
}
files = {
'/etc/dehydrated/domains.txt': {
'content_type': 'mako',
'triggers': {
'action:letsencrypt_update_certificates',
},
},
'/etc/dehydrated/config': {},
'/etc/dehydrated/hook.sh': {
'content_type': 'mako',
'mode': '0755',
},
}