blob: 9e7b392e22b00c5f4a935357a88645f9e95cd497 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# Returns a hash to be merged into a nginx::resource::server resources
# parameters.
# @param cert_name
# name of the domain in question, NOT the local certificate name.
# @return hash usable with nginx::resource::server
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",
}
}
}
|