summaryrefslogtreecommitdiff
path: root/manifests/phpldapadmin.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-11-13 03:46:15 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-11-13 04:03:26 +0100
commitbde09f5c2e52ed91410e3db5a3eea812fa344f1a (patch)
tree235838ec799af250ab54e5388addb4161723c28e /manifests/phpldapadmin.pp
parentIntroduce hiera + fix php fpm. (diff)
downloadprofiles-bde09f5c2e52ed91410e3db5a3eea812fa344f1a.tar.gz
profiles-bde09f5c2e52ed91410e3db5a3eea812fa344f1a.tar.xz
Add ldapadmin profile.
Diffstat (limited to 'manifests/phpldapadmin.pp')
-rw-r--r--manifests/phpldapadmin.pp31
1 files changed, 31 insertions, 0 deletions
diff --git a/manifests/phpldapadmin.pp b/manifests/phpldapadmin.pp
new file mode 100644
index 0000000..416ca19
--- /dev/null
+++ b/manifests/phpldapadmin.pp
@@ -0,0 +1,31 @@
+class profiles::phpldapadmin (
+ String $nginx_server,
+) {
+
+ # TODO
+ # include ::profiles::phpfpm
+
+ class { 'phpldapadmin':
+ auth_type => 'cookie',
+ }
+
+ nginx::resource::location { 'phpldapadmin':
+ location => '~ \.php$',
+ server => $nginx_server,
+ fastcgi_params => 'snippets/fastcgi-php.conf',
+ fastcgi => 'unix:/run/php/php-fpm.sock',
+ ssl => true,
+ ssl_only => true,
+ www_root => '/usr/share/webapps/phpldapadmin',
+ location_allow => [
+ '127.0.0.1',
+ '::1',
+ "${facts['network6']}/${extlib::netmask_to_cidr($facts['netmask6'])}",
+ "${facts['network']}/${extlib::netmask_to_cidr($facts['netmask'])}",
+ ],
+ location_deny => [
+ 'all',
+ ],
+ }
+
+}