# Returns a hash to be merged into a nginx::resource::server resources # parameters. The cert_name parameter should be the name of the domain in question, and NOT the local certificate name. function letsencrypt::conf::nginx ( String $cert_name, ) >> Letsencrypt::Ssl_conf::Nginx { $cert_path = $facts['letsencrypt_directory'][$cert_name] if $cert_path == undef { { ssl => false, } } else { { ssl => true, ssl_redirect => true, ssl_cert => "${cert_path}/fullchain.pem", ssl_key => "${cert_path}/privkey.pem", } } }