hook for haproxy working

This commit is contained in:
brunobenchimol
2021-11-15 20:08:56 -03:00
parent 5dba35e1ee
commit f47c04eeb5
9 changed files with 154 additions and 39 deletions
+22 -8
View File
@@ -8,6 +8,8 @@ certbot_auto_renew_options: "--quiet --no-self-upgrade"
# Enable to use staging server instead of production (useful for testing)
certbot_use_staging_server: false
# Enable delete certificates prior generating
certbot_delete_certificate: false
# Parameters used when creating new Certbot certs.
certbot_create_if_missing: false
@@ -22,6 +24,9 @@ certbot_certs: []
# - example3.com
certbot_create_command: >-
{{ certbot_script }} certonly --standalone --noninteractive --agree-tos
{{ '--test-cert'
if certbot_use_staging_server
else '' }}
--email {{ cert_item.email | default(certbot_admin_email) }}
-d {{ cert_item.domains | join(',') }}
{{ '--pre-hook /etc/letsencrypt/renewal-hooks/pre/stop_services'
@@ -34,11 +39,12 @@ certbot_create_command: >-
# Parameters DNS Plugins (used when certbot_create_method = dns)
certbot_dns_plugin: rfc2136
# certbot_dns_credentials_custom_file: <file-path> # use when plugin is != rfc2136
certbot_dns_target_server: 127.0.0.1
certbot_dns_target_server_port: 53
certbot_dns_tsig_keyname: "certbot."
certbot_dns_key_secret: "azertyAZERTY123456"
certbot_dns_key_algorithm: "HMAC-MD5"
# certbot_dns_target_server: 127.0.0.1
# certbot_dns_target_server_port: 53
# certbot_dns_tsig_keyname: "certbot."
# certbot_dns_key_secret: "azertyAZERTY123456"
# certbot_dns_key_algorithm: "HMAC-MD5"
certbot_dns_create_command: >-
{{ certbot_script }} certonly --noninteractive --agree-tos
{{ '--test-cert'
@@ -47,18 +53,26 @@ certbot_dns_create_command: >-
--dns-{{ certbot_dns_plugin }} --dns-{{ certbot_dns_plugin }}-credentials {{ certbot_dns_credentials_file }}
--email {{ cert_item.email | default(certbot_admin_email) }}
-d {{ cert_item.domains | join(',') }}
{{ '--deploy-hook /etc/letsencrypt/renewal-hooks/deploy/renew_hook.sh'
if certbot_create_dns_renew_hook_services
{{ '--deploy-hook /etc/letsencrypt/renewal-hooks/deploy/deploy_hook.sh'
if certbot_create_dns_deploy_hook_services
else '' }}
certbot_create_dns_renew_hook_services:
certbot_create_dns_deploy_hook_services:
- haproxy
#- nginx
#- apache
certbot_create_standalone_stop_services:
- nginx
# - apache
# - varnish
# [root@dnstest-default-9qvkw-test-3 ~]# certbot delete --cert-name certbotdnstest.staging.prodepa.pa.gov.br -n
certbot_delete_command: >-
{{ certbot_script }} delete --noninteractive
--cert-name {{ cert_item.domains | first | replace('*.', '') }}
# Available options: 'package', 'snap', 'source'.
certbot_install_method: 'package'