role slapd: can load additionnal schema and load arbitrary ldif files to be put in template directory

This commit is contained in:
2019-07-17 18:34:15 +02:00
parent 39a49698bc
commit 2ee476a4ef
6 changed files with 91 additions and 12 deletions

View File

@@ -0,0 +1,12 @@
- name: debug
debug:
msg: "schema {{ schema }}"
- name: check if schema is loaded
command: "ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=schema,cn=config dn"
register: ldap_schema_list
- name: import additional schemas
command: "ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/{{ schema }}.ldif"
when: schema not in ldap_schema_list.stdout