# profiles::certbot::server class profiles::certbot::server ( String $contact, Array[Stdlib::Fqdn] $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, } } # export haproxy balancemember profiles::haproxy::balancemember { "${facts['networking']['fqdn']}_8888": service => 'be_letsencrypt', ports => [8888], options => [] } }