role slapd: mise au point verification insertion schema
This commit is contained in:
@@ -21,17 +21,18 @@
|
|||||||
values: "{{ item.value }}"
|
values: "{{ item.value }}"
|
||||||
state: exact
|
state: exact
|
||||||
with_dict:
|
with_dict:
|
||||||
|
olcSuffix: "{{ ldap_suffix }}"
|
||||||
olcRootDN: "{{ ldap_admin_dn }}"
|
olcRootDN: "{{ ldap_admin_dn }}"
|
||||||
olcRootPW: "{{ ldap_admin_password }}"
|
olcRootPW: "{{ ldap_admin_password }}"
|
||||||
olcSuffix: "{{ ldap_suffix }}"
|
|
||||||
|
|
||||||
- name: check if schema already loaded
|
- name: check if schema cosine is loaded
|
||||||
command: ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=schema,cn=config -LLL olcObjectClasses='*0.9.2342.19200300.100.4.13 NAME*' dn
|
stat:
|
||||||
|
path: /etc/openldap/slapd.d/cn=config/cn=schema/cn={1}cosine.ldif
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: import mandatory schema
|
- name: import mandatory schema
|
||||||
command: "ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif"
|
command: "ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif"
|
||||||
when: not result.stdout.find( 'cosine,cn=schema,cn=config' )
|
when: result.stat.exists==False
|
||||||
|
|
||||||
- name: create suffix
|
- name: create suffix
|
||||||
ldap_entry:
|
ldap_entry:
|
||||||
|
|||||||
Reference in New Issue
Block a user