mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-23 16:51:09 +02:00
Expect this to solve openldap import bug
This commit is contained in:
parent
a84abbdade
commit
ff18c7cd73
@ -68,5 +68,5 @@ docker exec -i ldap \
|
|||||||
-D "$LDAP_ADMIN_DN" \
|
-D "$LDAP_ADMIN_DN" \
|
||||||
-w "$LDAP_ADMIN_PASSWORD" \
|
-w "$LDAP_ADMIN_PASSWORD" \
|
||||||
-c \
|
-c \
|
||||||
-f "/tmp/ldif/data/01_rbac.ldif"
|
-f "/tmp/ldif/groups/01_rbac.ldif"
|
||||||
```
|
```
|
@ -45,11 +45,11 @@
|
|||||||
|
|
||||||
- name: "Import users, groups, etc. to LDAP"
|
- name: "Import users, groups, etc. to LDAP"
|
||||||
shell: >
|
shell: >
|
||||||
docker exec -i {{ openldap_name }} ldapadd -x -D "{{ldap.dn.administrator.data}}" -w "{{ldap.bind_credential}}" -c -f "{{openldap_ldif_docker_path}}data/{{ item | basename | regex_replace('\.j2$', '') }}"
|
docker exec -i {{ openldap_name }} ldapadd -x -D "{{ldap.dn.administrator.data}}" -w "{{ldap.bind_credential}}" -c -f "{{openldap_ldif_docker_path}}groups/{{ item | basename | regex_replace('\.j2$', '') }}"
|
||||||
register: ldapadd_result
|
register: ldapadd_result
|
||||||
changed_when: "'adding new entry' in ldapadd_result.stdout"
|
changed_when: "'adding new entry' in ldapadd_result.stdout"
|
||||||
failed_when: ldapadd_result.rc not in [0, 20, 68, 65]
|
failed_when: ldapadd_result.rc not in [0, 20, 68, 65]
|
||||||
listen:
|
listen:
|
||||||
- "Import data LDIF files"
|
- "Import data LDIF files"
|
||||||
- "Import all LDIF files"
|
- "Import all LDIF files"
|
||||||
loop: "{{ query('fileglob', role_path ~ '/templates/ldif/data/*.j2') | sort }}"
|
loop: "{{ query('fileglob', role_path ~ '/templates/ldif/groups/*.j2') | sort }}"
|
@ -12,7 +12,7 @@ openldap_ldif_host_path: "{{docker_compose.directories.volumes}}ldif/"
|
|||||||
openldap_ldif_docker_path: "/tmp/ldif/"
|
openldap_ldif_docker_path: "/tmp/ldif/"
|
||||||
openldap_ldif_types:
|
openldap_ldif_types:
|
||||||
- configuration
|
- configuration
|
||||||
- data
|
- groups
|
||||||
- schema # Don't know if this is still needed, it's now setup via tasks
|
- schema # Don't know if this is still needed, it's now setup via tasks
|
||||||
|
|
||||||
openldap_name: "{{ applications | get_app_conf(application_id, 'docker.services.openldap.name', True) }}"
|
openldap_name: "{{ applications | get_app_conf(application_id, 'docker.services.openldap.name', True) }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user