From 5cb6fe3507fa9441ad3d2e6c5cfd24342a9823ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 30 Dec 2021 01:13:26 +0100 Subject: Cgit fixes. --- modules/cgit/manifests/nginx.pp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/cgit/manifests/nginx.pp') diff --git a/modules/cgit/manifests/nginx.pp b/modules/cgit/manifests/nginx.pp index f2a1396..329c21d 100644 --- a/modules/cgit/manifests/nginx.pp +++ b/modules/cgit/manifests/nginx.pp @@ -9,7 +9,7 @@ class cgit::nginx { try_files => [ '$uri', '@cgit' ], ssl => false, use_default_location => true, - www_root => $cgit_root, + www_root => $cgit::root, } } else { nginx::resource::server { 'cgit': @@ -22,7 +22,7 @@ class cgit::nginx { ssl_cert => "/etc/letsencrypt/live/${cgit::certname}/fullchain.pem", ssl_key => "/etc/letsencrypt/live/${cgit::certname}/privkey.pem", use_default_location => true, - www_root => $cgit_root, + www_root => $cgit::root, ssl_redirect => true, } } @@ -41,8 +41,7 @@ class cgit::nginx { ], } - $cgit_htpasswd = '/var/lib/nginx/cgit-htpasswd' - file { $cgit_htpasswd: + file { $cgit::htpasswd: ensure => file, content => $cgit::users.map |$user| { [$user['name'], $user['pass']].join(':') @@ -70,7 +69,7 @@ class cgit::nginx { ssl_only => $cgit::certname != undef, location_cfg_append => { auth_basic => '"CGit login"', - auth_basic_user_file => $cgit_htpasswd, + auth_basic_user_file => $cgit::htpasswd, }, fastcgi => 'unix:/run/fcgiwrap.socket', fastcgi_params => 'fastcgi_params', -- cgit v1.2.3