Solved multiple bugs and propably produced 100 more.... Usual Nightshift...

This commit is contained in:
2025-02-21 03:53:27 +01:00
parent 5694023da8
commit bdeaf14285
15 changed files with 30 additions and 41 deletions

View File

@@ -22,7 +22,7 @@
- name: "Import users, groups, etc. to LDAP"
shell: >
docker exec -i openldap ldapadd -x -D "{{ldap.dn.bind}}" -w "{{ldap.bind_credential}}" -c -f "{{ldif_docker_path}}/import/{{ item | basename | regex_replace('\\.j2$', '') }}"
docker exec -i openldap ldapadd -x -D "{{ldap.dn.bind}}" -w "{{ldap.bind_credential}}" -c -f "{{ldif_docker_path}}import/{{ item | basename | regex_replace(r'\.j2$', '') }}"
register: ldapadd_result
changed_when: "'adding new entry' in ldapadd_result.stdout"
# Allow return code 0 (all entries added) or 68 (entry already exists)

View File

@@ -27,9 +27,6 @@
ipam_config:
- subnet: "{{ networks.local.central_ldap.subnet }}"
- name: "copy docker-compose.yml and env file"
include_tasks: copy-docker-compose-and-env.yml
- name: "create {{docker_compose.directories.env}}phpldapadmin.env"
template:
src: "phpldapadmin.env.j2"
@@ -48,8 +45,8 @@
notify: docker compose project setup
when: applications.ldap.webinterface == 'lam'
- name: flush docker service
meta: flush_handlers
- name: "copy docker-compose.yml and env file"
include_tasks: copy-docker-compose-and-env.yml
- name: "create directory {{ldif_host_path}}{{item}}"
file:

View File

@@ -10,14 +10,14 @@ services:
{% if applications.ldap.webinterface == 'lam' %}
image: ghcr.io/ldapaccountmanager/lam:{{applications.ldap.lam.version}} # Dies ist das Docker-Image für LAM
ports:
- 127.0.0.1:{{http_port}}:80
- 127.0.0.1:{{ports.localhost.http.ldap}}:80
env_file:
- "{{docker_compose.directories.env}}lam.env"
{% elif applications.ldap.webinterface == 'phpldapadmin' %}
image: leenooks/phpldapadmin:{{applications.ldap.phpldapadmin.version}}
ports:
- 127.0.0.1:{{http_port}}:8080
- 127.0.0.1:{{ports.localhost.http.ldap}}:8080
env_file:
- "{{docker_compose.directories.env}}phpldapadmin.env"
{% endif %}