26 lines
692 B
Puppet
26 lines
692 B
Puppet
# profiles::certbot::letsencrypt
|
|
class profiles::certbot::letsencrypt (
|
|
String $contact = $profiles::certbot::init::contact,
|
|
Array[Stdlib::Fqdn] $domains = $profiles::certbot::init::domains,
|
|
) {
|
|
|
|
class { 'letsencrypt':
|
|
configure_epel => false,
|
|
package_ensure => 'latest',
|
|
email => $contact,
|
|
}
|
|
|
|
# set location_environment
|
|
$location_environment = "${facts['country']}-${facts['region']}-${facts['environment']}"
|
|
|
|
# collect exported resources
|
|
Letsencrypt::Certonly <<| tag == $location_environment |>>
|
|
|
|
# statically defined certificate
|
|
$domains.each | $domain | {
|
|
profiles::certbot::cert {$domain:
|
|
domain => $domain,
|
|
}
|
|
}
|
|
}
|