role slapd: can load additionnal schema and load arbitrary ldif files to be put in template directory
This commit is contained in:
12
tasks/import_ldap_schema.yml
Normal file
12
tasks/import_ldap_schema.yml
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user