puppet-prod/site/profiles/manifests/certbot/letsencrypt.pp
Ben Vincent 30ec8c1bb1 feat: enable retrieval of certbot certs
- refactor certbot
- add nginx to certbot hosts
2024-07-07 22:30:40 +10:00

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,
}
}
}