From 811fa11044d25d504f8ef6b16c5df3f9bc6ec713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20R=2E=20H=C3=B6lzlwimmer?= Date: Tue, 28 Jan 2025 19:18:21 +0100 Subject: [PATCH] add --cert-name and --deploy-hook options --- defaults/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 9ac2823..3deb2f4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -40,6 +40,7 @@ certbot_create_command: >- {{ '--webroot-path ' if certbot_create_method == 'webroot' else '' }} {{ cert_item.webroot | default(certbot_webroot) if certbot_create_method == 'webroot' else '' }} {{ certbot_create_extra_args }} + --cert-name {{ cert_item.name | default(cert_item.domains | first | replace('*.', '') ) }} -d {{ cert_item.domains | join(',') }} {{ '--pre-hook /etc/letsencrypt/renewal-hooks/pre/stop_services' if certbot_create_standalone_stop_services and certbot_create_method == 'standalone' @@ -47,6 +48,9 @@ certbot_create_command: >- {{ '--post-hook /etc/letsencrypt/renewal-hooks/post/start_services' if certbot_create_standalone_stop_services and certbot_create_method == 'standalone' else '' }} + {{ '--deploy-hook \'' + cert_item.deploy_hook + '\'' + if 'deploy_hook' in cert_item + else '' }} certbot_create_standalone_stop_services: - nginx