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. --- manifests/nginx.pp | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 manifests/nginx.pp (limited to 'manifests/nginx.pp') diff --git a/manifests/nginx.pp b/manifests/nginx.pp deleted file mode 100644 index 75b5b48..0000000 --- a/manifests/nginx.pp +++ /dev/null @@ -1,52 +0,0 @@ -# Sets up nginx specific configuration, and provides access to -# variables for enterpolating into nginx configurations -# -# These use the default cert name -# @example -# nginx::resource::server { 'servername': -# * => $letsescrypt::nginx::server_ssl -# } -# $letsencrypt::nginx::location_ssl -# -# @param certbot_plugin_package -# Name of the system package providing this plugin. -# Populated through hiera. -# @param manage_package -# If this class should manage the package. -class letsencrypt::nginx ( - String $certbot_plugin_package, - Boolean $manage_package = true, -) { - # TODO $cert_path should use the default certificate name. - # There should however also be a hash of all configured - # certificates. - $cert_path = "${letsencrypt::config_dir}/live/${letsencrypt::config_dir::default_cert_name}" - - $server_ssl = if $letsencrypt::ssl_configured { - { - ssl => true, - ssl_redirect => true, - ssl_cert => "${cert_path}/fullchain.pem", - ssl_key => "${cert_path}/privkey.pem", - } - } else { - { - ssl => false, - } - } - - $location_ssl = if $letsencrypt::ssl_configured { - { - ssl => true, - ssl_only => true, - } - } else { - { - ssl => false, - } - } - - if $manage_package { - ensure_packages([$certbot_plugin_package]) - } -} -- cgit v1.2.3