feat: update certbot module
- update documentation - add option to notify services - set haproxy role to notify the haproxy service
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user