feat: update certbot module

- update documentation
- add option to notify services
- set haproxy role to notify the haproxy service
This commit is contained in:
2024-10-07 13:16:41 +11:00
parent 4bf4b42fdf
commit 2ef4fb0bf8
3 changed files with 28 additions and 4 deletions
+12 -4
View File
@@ -1,7 +1,14 @@
# used by certbot clients to request letsencrypt certificates
# - domains: list of certificates to generate
# - webserver: where the client downloads certificates from
# - data_dir: where to store the certificates on the client
# - services: the services to notify when certificates change
#
class certbot::client (
Array[Stdlib::Fqdn] $domains,
Stdlib::Fqdn $webserver,
Stdlib::Absolutepath $data_dir = '/etc/pki/tls/letsencrypt/',
Optional[String] $service = undef,
) {
mkdir::p {$data_dir:}
@@ -14,10 +21,11 @@ class certbot::client (
$domains.each |$domain| {
certbot::client::cert {"${facts['networking']['fqdn']}_download_${domain}":
domain => $domain,
destination => "${data_dir}/${domain}",
webserver => $webserver,
require => File[$data_dir],
domain => $domain,
destination => "${data_dir}/${domain}",
webserver => $webserver,
require => File[$data_dir],
notify_service => $service,
}
}
}