2020-06-01 08:26:37 +00:00
|
|
|
assert node.has_bundle('nginx'), 'letsencrypt needs nginx'
|
|
|
|
|
|
|
|
pkg_apt = {
|
|
|
|
'dehydrated': {},
|
|
|
|
}
|
|
|
|
|
|
|
|
actions = {
|
|
|
|
'letsencrypt_update_certificates': {
|
2020-07-19 10:10:19 +00:00
|
|
|
'command': 'dehydrated --cron --accept-terms --challenge http-01',
|
2020-06-01 08:26:37 +00:00
|
|
|
'triggered': True,
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:dehydrated',
|
|
|
|
},
|
2020-07-26 16:48:37 +00:00
|
|
|
'needed_by': {
|
|
|
|
'svc_systemd:nginx',
|
|
|
|
},
|
2020-06-01 08:26:37 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
|
|
|
'/etc/dehydrated/domains.txt': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'action:letsencrypt_update_certificates',
|
|
|
|
},
|
|
|
|
},
|
2020-07-26 16:48:37 +00:00
|
|
|
'/etc/dehydrated/config': {
|
|
|
|
'triggers': {
|
|
|
|
'action:letsencrypt_update_certificates',
|
|
|
|
},
|
|
|
|
},
|
2020-06-01 10:29:16 +00:00
|
|
|
'/etc/dehydrated/hook.sh': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'mode': '0755',
|
|
|
|
},
|
2020-06-01 08:26:37 +00:00
|
|
|
}
|