# certbot::letsencrypt class certbot::letsencrypt ( String $contact = $certbot::contact, Array[Stdlib::Fqdn] $domains = $certbot::domains, Stdlib::Absolutepath $data_root = $certbot::data_root, ) { 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 | { certbot::cert {$domain: domain => $domain, require => Class['letsencrypt'], } } systemd::timer { 'certbot-syncer.timer': timer_content => epp('certbot/certbot-syncer.timer.epp'), service_content => epp('certbot/certbot-syncer.service.epp', { 'data_root' => $data_root, }), active => true, enable => true, require => Class['letsencrypt'], } }