add letsencrypt bundle
This commit is contained in:
parent
04f2baacf4
commit
dc9e8dc679
5 changed files with 37 additions and 2 deletions
5
bundles/letsencrypt/files/domains.txt
Normal file
5
bundles/letsencrypt/files/domains.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
${node.hostname}
|
||||
|
||||
% for domain, aliases in node.metadata.get('letsencrypt', {}).get('domains', {}).items():
|
||||
${domain} ${' '.join(aliases)}
|
||||
% endfor
|
24
bundles/letsencrypt/items.py
Normal file
24
bundles/letsencrypt/items.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
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',
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue