Browse Source

ldap: fix domain and cn

evolinux-users
Victor LABORIE 4 years ago
parent
commit
c0c7183605
  1. 7
      ldap/defaults/main.yml
  2. 4
      ldap/templates/first-entries.ldif.j2

7
ldap/defaults/main.yml

@ -1,5 +1,4 @@
---
ldap_domain: "{{ ansible_fqdn }}"
ldap_organization: "{{ ansible_domain }}"
ldap_suffix: "dc=example,dc=com"
ldap_suffix_dc: "example"
ldap_hostname: "{{ ansible_hostname }}"
ldap_domain: "{{ ansible_domain }}"
ldap_suffix: "dc={{ ldap_hostname }},dc={{ ldap_domain.split('.')[-2] }},dc={{ ldap_domain.split('.')[-1] }}"

4
ldap/templates/first-entries.ldif.j2

@ -2,8 +2,8 @@ dn: {{ ldap_suffix }}
objectClass: top
objectClass: dcObject
objectClass: organization
o: {{ ldap_suffix_dc }}
dc: {{ ldap_suffix_dc }}
o: {{ ldap_domain }}
dc: {{ ldap_hostname }}
dn: cn=admin,{{ ldap_suffix }}
objectClass: simpleSecurityObject

Loading…
Cancel
Save