Redesigned LDAP (DRAFT)

This commit is contained in:
2025-02-21 00:26:33 +01:00
parent a39f1914ea
commit 07beddb5a2
14 changed files with 115 additions and 87 deletions

View File

@@ -0,0 +1,7 @@
- name: "Create LDIF files at {{ ldif_host_path }}/{{ folder }}"
template:
src: "{{ item }}"
dest: "{{ ldif_host_path }}/{{ folder }}/{{ item | basename | regex_replace('\\.j2$', '') }}"
mode: '770'
loop: "{{ lookup('fileglob', role_path ~ '/templates/ldif/' ~ folder ~ '/*.j2', wantlist=True) }}"
notify: Import LDIF files

View File

@@ -51,19 +51,18 @@
- name: flush docker service
meta: flush_handlers
- name: "create directory {{ldif_host_path}}"
- name: "create directory {{ldif_host_path}}{{item}}"
file:
path: "{{ldif_host_path}}"
path: "{{ldif_host_path}}{{item}}"
state: directory
mode: 0755
loop: "{{ldif_types}}"
- name: "Create LDIF files at {{ ldif_host_path }}"
template:
src: "{{ item }}"
dest: "{{ ldif_host_path }}/{{ item | basename | regex_replace('\\.j2$', '') }}"
mode: '770'
loop: "{{ lookup('fileglob', '{{ role_path }}/templates/ldif/*.j2', wantlist=True) }}"
notify: Import LDIF files
- name: "Process all LDIF types"
include_tasks: create_ldif_files.yml
loop: "{{ ldif_types }}"
loop_control:
loop_var: folder
- name: Force LDIF files import
command: /bin/true