mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized memberof for docker-ldap. LAM integration not functioning yet
This commit is contained in:
@@ -8,11 +8,13 @@ services:
|
||||
driver: journald
|
||||
restart: {{docker_restart_policy}}
|
||||
{% if applications.ldap.webinterface == 'lam' %}
|
||||
image: ghcr.io/ldapaccountmanager/lam:{{applications.ldap.lam.version}} # Dies ist das Docker-Image für LAM
|
||||
image: ghcr.io/ldapaccountmanager/lam:{{applications.ldap.lam.version}}
|
||||
ports:
|
||||
- 127.0.0.1:{{ports.localhost.http.ldap}}:80
|
||||
env_file:
|
||||
- "{{docker_compose.directories.env}}lam.env"
|
||||
volumes:
|
||||
- "{{ lam_profiles_dir }}:/var/lib/ldap-account-manager/config/profiles/"
|
||||
|
||||
{% elif applications.ldap.webinterface == 'phpldapadmin' %}
|
||||
image: leenooks/phpldapadmin:{{applications.ldap.phpldapadmin.version}}
|
||||
@@ -34,11 +36,14 @@ services:
|
||||
- '{{ldif_host_path}}:{{ldif_docker_path}}:ro' # Mounting all ldif files for import
|
||||
healthcheck:
|
||||
test: >
|
||||
ldapsearch -x -H ldap://localhost:{{ldap_docker_port}} -b "{{ldap.dn.root}}" -D "{{ldap.dn.administrator}}" -w "{{ldap.bind_credential}}"
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
bash -c '
|
||||
ldapsearch -x -H ldap://localhost:{{ ldap_docker_port }} \
|
||||
-D "{{ ldap.dn.administrator }}" -w "{{ ldap.bind_credential }}" -b "{{ ldap.dn.root }}" > /dev/null \
|
||||
&& \
|
||||
ldapsearch -Y EXTERNAL -H ldapi:/// \
|
||||
-b cn=config "(&(objectClass=olcOverlayConfig)(olcOverlay=memberof))" \
|
||||
| grep "olcOverlay:" | grep -q "memberof"
|
||||
'
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
|
||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
||||
|
1
roles/docker-ldap/templates/lam/default.group.j2
Normal file
1
roles/docker-ldap/templates/lam/default.group.j2
Normal file
@@ -0,0 +1 @@
|
||||
Modules: groupOfNames
|
5
roles/docker-ldap/templates/lam/groupOfNames.conf.j2
Normal file
5
roles/docker-ldap/templates/lam/groupOfNames.conf.j2
Normal file
@@ -0,0 +1,5 @@
|
||||
type: group
|
||||
module: groupOfNames
|
||||
cn: cn
|
||||
description: description
|
||||
member: member
|
Reference in New Issue
Block a user