2020-08-18 13:27:55 +00:00
|
|
|
defaults = {
|
2021-06-01 14:52:52 +00:00
|
|
|
'apt': {
|
|
|
|
'packages': {
|
2021-12-23 18:38:21 +00:00
|
|
|
'openssl': {
|
|
|
|
'needed_by': {
|
|
|
|
'action:letsencrypt_update_certificates',
|
|
|
|
},
|
|
|
|
},
|
2021-12-19 13:16:14 +00:00
|
|
|
'dehydrated': {
|
|
|
|
'needed_by': {
|
|
|
|
'action:letsencrypt_update_certificates',
|
|
|
|
},
|
|
|
|
},
|
2021-06-01 14:52:52 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'pacman': {
|
|
|
|
'packages': {
|
2021-12-19 13:16:14 +00:00
|
|
|
'dehydrated': {
|
|
|
|
'needed_by': {
|
|
|
|
'action:letsencrypt_update_certificates',
|
|
|
|
},
|
|
|
|
},
|
2021-06-01 14:52:52 +00:00
|
|
|
},
|
|
|
|
},
|
2020-08-18 13:27:55 +00:00
|
|
|
}
|
2022-02-05 10:41:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
@metadata_reactor.provides(
|
2022-09-11 09:26:24 +00:00
|
|
|
'systemd-timers/timers/letsencrypt',
|
2022-02-05 10:41:41 +00:00
|
|
|
)
|
|
|
|
def cron(metadata):
|
|
|
|
if node.metadata.get('letsencrypt/domains'):
|
|
|
|
return {
|
2022-09-11 09:26:24 +00:00
|
|
|
'systemd-timers': {
|
|
|
|
'timers': {
|
|
|
|
'letsencrypt': {
|
|
|
|
'command': [
|
|
|
|
'/usr/bin/dehydrated --cron --accept-terms --challenge http-01',
|
|
|
|
'/usr/bin/dehydrated --cleanup',
|
|
|
|
],
|
|
|
|
'when': '04:{}:00'.format(node.magic_number % 60),
|
|
|
|
},
|
2022-02-05 10:41:41 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
return {}
|