Solved different bugs

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-09 11:51:42 +02:00
parent a026681553
commit e7322a239e
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
11 changed files with 17 additions and 17 deletions

View File

@ -16,7 +16,7 @@ ports:
gitea: 4188
snipe-it: 4189
ldap:
ldap: 389
openldap: 389
http:
nextcloud: 8001
gitea: 8002

View File

@ -30,7 +30,7 @@ defaults_networks:
subnet: 192.168.101.144/28
keycloak:
subnet: 192.168.101.160/28
ldap:
openldap:
subnet: 192.168.101.176/28
listmonk:
subnet: 192.168.101.192/28

View File

@ -6,7 +6,7 @@
# Helper Variables:
# Keep in mind to mapp this variables if there is ever the possibility for the user to define them in the inventory
_ldap_dn_base: "dc={{primary_domain_sld}},dc={{primary_domain_tld}}"
_ldap_server_port: "{% if applications.ldap.network.docker | bool %}{{ ports.localhost.ldap.ldap }}{% else %}{{ ports.localhost.ldaps.ldap }}{% endif %}"
_ldap_server_port: "{% if applications.openldap.network.docker | bool %}{{ ports.localhost.ldap.openldap }}{% else %}{{ ports.localhost.ldaps.ldap }}{% endif %}"
_ldap_user_id: "uid"
_ldap_filters_users_all: "(|(objectclass=inetOrgPerson))"
@ -25,7 +25,7 @@ ldap:
# The DN used to authenticate for regular directory operations under
# the data tree (adding users, modifying attributes, creating OUs, etc.).
# Typically: “cn=admin,dc=example,dc=com”
data: "cn={{ applications.ldap.users.administrator.username }},{{ _ldap_dn_base }}"
data: "cn={{ applications.openldap.users.administrator.username }},{{ _ldap_dn_base }}"
# -------------------------------------------------------------------------
# Config-Tree Administrator Bind DN
@ -33,7 +33,7 @@ ldap:
# need to load or modify schema, overlays, modules, or other server-
# level settings.
# Typically: “cn=admin,cn=config”
configuration: "cn={{ applications.ldap.users.administrator.username }},cn=config"
configuration: "cn={{ applications.openldap.users.administrator.username }},cn=config"
ou:
# -------------------------------------------------------------------------
@ -55,14 +55,14 @@ ldap:
# for ordinary user/group operations, and vice versa.
# Password to access dn.bind
bind_credential: "{{ applications.ldap.credentials.administrator_database_password }}"
bind_credential: "{{ applications.openldap.credentials.administrator_database_password }}"
server:
domain: "{{applications.ldap.hostname if applications.ldap.network.docker | bool else domains.ldap}}" # Mapping for public or locale access
domain: "{{applications.openldap.hostname if applications.openldap.network.docker | bool else domains.openldap}}" # Mapping for public or locale access
port: "{{_ldap_server_port}}"
uri: "{% if applications.ldap.network.docker | bool %}ldap://{{ applications.ldap.hostname }}{% else %}ldaps://{{ domains.ldap }}{% endif %}:{{ _ldap_server_port }}"
uri: "{% if applications.openldap.network.docker | bool %}ldap://{{ applications.openldap.hostname }}{% else %}ldaps://{{ domains.openldap }}{% endif %}:{{ _ldap_server_port }}"
security: "" #TLS, SSL - Leave empty for none
network:
local: "{{applications.ldap.network.docker}}" # Uses the application configuration to define if local network should be available or not
local: "{{applications.openldap.network.docker}}" # Uses the application configuration to define if local network should be available or not
user:
objects:
structural:

View File

@ -4,7 +4,7 @@ networks:
central_{{ database_type }}:
external: true
{% endif %}
{% if applications[application_id].get('features', {}).get('ldap', false) and applications.ldap.network.docker | bool %}
{% if applications[application_id].get('features', {}).get('ldap', false) and applications.openldap.network.docker | bool %}
central_ldap:
external: true
{% endif %}

View File

@ -3,7 +3,7 @@
{% if applications | is_feature_enabled('central_database',application_id) | bool and database_type is defined %}
central_{{ database_type }}:
{% endif %}
{% if applications[application_id].get('features', {}).get('ldap', false) | bool and applications.ldap.network.docker|bool %}
{% if applications[application_id].get('features', {}).get('ldap', false) | bool and applications.openldap.network.docker|bool %}
central_ldap:
{% endif %}
default:

View File

@ -6,7 +6,7 @@
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% if applications[application_id].network.public | bool or applications[application_id].network.local | bool %}
ports:
- 127.0.0.1:{{ports.localhost.ldap.ldap}}:{{ldap_docker_port}}
- 127.0.0.1:{{ports.localhost.ldap.openldap}}:{{ldap_docker_port}}
{% endif %}
volumes:
- 'data:/bitnami/openldap'

View File

@ -1,6 +1,6 @@
server {
listen {{ports.public.ldaps.ldap}}ssl;
proxy_pass 127.0.0.1:{{ports.localhost.ldap.ldap}};
proxy_pass 127.0.0.1:{{ports.localhost.ldap.openldap}};
{% include 'roles/net-letsencrypt/templates/ssl_credentials.j2' %}
}

View File

@ -3,7 +3,7 @@ application_id: "openldap"
# LDAP Variables
ldaps_docker_port: 636
ldap_docker_port: 389
ldap_server_uri: "ldap://127.0.0.1:{{ ports.localhost.ldap.ldap }}"
ldap_server_uri: "ldap://127.0.0.1:{{ ports.localhost.ldap.openldap }}"
ldap_hostname: "{{ applications[application_id].hostname }}"
ldap_bind_dn: "{{ ldap.dn.administrator.configuration }}"
ldap_bind_pw: "{{ applications[application_id].credentials.administrator_password }}"

View File

@ -11,7 +11,7 @@
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "include tasks update-repository-with-files.yml"
include_tasks: update-repository-with-files.yml
include_tasks: utils/update-repository-with-files.yml
vars:
detached_files:
- "docker-compose.yml"

View File

@ -20,7 +20,7 @@
notify: restart nginx
- name: "include tasks update-repository-with-files.yml"
include_tasks: update-repository-with-files.yml
include_tasks: utils/update-repository-with-files.yml
vars:
detached_files:
- "docker-compose.yml"

View File

@ -27,7 +27,7 @@ plugin_configuration:
-
appid: "user_ldap"
configkey: "s01ldap_backup_port"
configvalue: "{{ ports.localhost.ldap.ldap }}" # This is just optimized for local port @todo implement for external ports as well
configvalue: "{{ ports.localhost.ldap.openldap }}" # This is just optimized for local port @todo implement for external ports as well
-
appid: "user_ldap"