Support for certbot's --deploy-hook option

Allows users of this role to pass a custom argument to certbot's
--deploy-hook option.
This commit is contained in:
Jeffrey Esquivel S 2023-05-20 16:41:52 -06:00
parent 08543f45b2
commit b3885c0613
2 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,12 @@ Services that should be stopped while `certbot` runs it's own standalone server
These services will only be stopped the first time a new cert is generated.
#### Deploy hook
certbot_deploy_hook:
If not empty, the value of this variable will be used as the argument to certbot's --deploy-hook option.
### Snap Installation
Beginning in December 2020, the Certbot maintainers decided to recommend installing Certbot from Snap rather than maintain scripts like `certbot-auto`.

View File

@ -36,6 +36,7 @@ certbot_create_command: >-
{{ '--webroot-path ' if certbot_create_method == 'webroot' else '' }}
{{ cert_item.webroot | default(certbot_webroot) if certbot_create_method == 'webroot' else '' }}
-d {{ cert_item.domains | join(',') }}
{{ '--deploy-hook {}'.format(certbot_deploy_hook) if certbot_deploy_hook else '' }}
{{ '--pre-hook /etc/letsencrypt/renewal-hooks/pre/stop_services'
if certbot_create_standalone_stop_services and certbot_create_method == 'standalone'
else '' }}
@ -43,6 +44,8 @@ certbot_create_command: >-
if certbot_create_standalone_stop_services and certbot_create_method == 'standalone'
else '' }}
certbot_deploy_hook:
certbot_create_standalone_stop_services:
- nginx
# - apache