mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Redesigned LDAP (DRAFT)
This commit is contained in:
7
roles/docker-ldap/tasks/create_ldif_files.yml
Normal file
7
roles/docker-ldap/tasks/create_ldif_files.yml
Normal 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
|
@@ -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
|
||||
|
Reference in New Issue
Block a user