aboutsummaryrefslogtreecommitdiff
path: root/functions/conf/nginx.pp
blob: aa5f30e1edb7863ce807d0f809539f8066723dd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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",
    }
  }
}