aboutsummaryrefslogtreecommitdiff
path: root/functions/conf/nginx/location.pp
diff options
context:
space:
mode:
Diffstat (limited to 'functions/conf/nginx/location.pp')
-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,
+ }
+ }
+}