2025-02-12 19:06:32 +01:00
|
|
|
- name: Load memberof module from file in OpenLDAP container
|
2025-02-11 16:19:08 +01:00
|
|
|
shell: >
|
2025-02-12 19:06:32 +01:00
|
|
|
docker exec -i openldap ldapmodify -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}01_member_of_configuration.ldif
|
|
|
|
listen: "Import LDIF files"
|
|
|
|
|
|
|
|
- name: Refint Module Activation for OpenLDAP
|
|
|
|
shell: >
|
|
|
|
docker exec -i openldap ldapadd -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}02_member_of_configuration.ldif
|
|
|
|
listen: "Import LDIF files"
|
|
|
|
register: ldapadd_result
|
|
|
|
failed_when: ldapadd_result.rc not in [0, 68]
|
|
|
|
|
|
|
|
- name: Refint Overlay Configuration for OpenLDAP
|
|
|
|
shell: >
|
|
|
|
docker exec -i openldap modify -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}02_member_of_configuration.ldif
|
|
|
|
listen: "Import LDIF files"
|
|
|
|
register: ldapadd_result
|
|
|
|
failed_when: ldapadd_result.rc not in [0, 68]
|
|
|
|
|
|
|
|
- name: "Import Access Roles to OpenLDAP"
|
|
|
|
shell: >
|
2025-02-18 14:46:09 +01:00
|
|
|
docker exec -i openldap ldapadd -x -D "{{ldap.dn.bind}}" -w "{{ldap.dn.bind_credential}}" -c -f "{{ldif_docker_path}}04_access_profiles.ldif"
|
2025-02-11 16:19:08 +01:00
|
|
|
register: ldapadd_result
|
|
|
|
changed_when: "'adding new entry' in ldapadd_result.stdout"
|
|
|
|
# Allow return code 0 (all entries added) or 68 (entry already exists)
|
|
|
|
failed_when: ldapadd_result.rc not in [0, 68]
|
2025-02-12 19:06:32 +01:00
|
|
|
listen: "Import LDIF files"
|