aboutsummaryrefslogtreecommitdiff
path: root/functions/conf/nginx/location.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-01-10 12:56:33 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-01-12 15:07:57 +0100
commit0a07215d422f8f606a41d822436e6c6dd93d001f (patch)
tree3e335e7fb5e3b03b90fdef953bf7be8afef73ff8 /functions/conf/nginx/location.pp
parentConvert to pdk module. (diff)
downloadhugonikanor-letsencrypt-0a07215d422f8f606a41d822436e6c6dd93d001f.tar.gz
hugonikanor-letsencrypt-0a07215d422f8f606a41d822436e6c6dd93d001f.tar.xz
Working product.
Diffstat (limited to '')
-rw-r--r--functions/conf/nginx/location.pp16
1 files changed, 16 insertions, 0 deletions
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,
+ }
+ }
+}