From 0a07215d422f8f606a41d822436e6c6dd93d001f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 10 Jan 2023 12:56:33 +0100 Subject: Working product. --- functions/conf/nginx/location.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 functions/conf/nginx/location.pp (limited to 'functions/conf/nginx/location.pp') diff --git a/functions/conf/nginx/location.pp b/functions/conf/nginx/location.pp new file mode 100644 index 0000000..84d0e82 --- /dev/null +++ b/functions/conf/nginx/location.pp @@ -0,0 +1,16 @@ +function letsencrypt::conf::nginx::location ( + String $cert_name, +) >> Letsencrypt::Ssl_conf::Nginx::Location { + $cert_path = $facts['letsencrypt_directory'][$cert_name] + + if $cert_path == undef { + { + ssl => false, + } + } else { + { + ssl => true, + ssl_only => true, + } + } +} -- cgit v1.2.3