Commit 25d6ce5c authored by nimrod's avatar nimrod
Browse files

Don't set default basedn, not always a single one. But use default ldapuri.

parent e618ad34
Loading
Loading
Loading
Loading
+3 −8
Changes for tasks/main.yml: 3 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -58,14 +58,9 @@
- name: Set default ldap client settings
  lineinfile:
    dest: /etc/ldap/ldap.conf
    line: '{{ item.line }}'
    regexp: '{{ item.regexp }}'
    state: present
  with_items:
    - line: 'BASE   {{ openldap_basedn }}'
      regexp: '^BASE'
    - line: 'URI    ldap://localhost'
    line: 'URI    ldapi:///'
    regexp: '^URI'
    state: present

- name: Generate LDAPS configuration
  template:
@@ -78,7 +73,7 @@

- name: Apply LDAPS Configuration
  when: ldaps_template.changed
  command: /usr/bin/ldapmodify -d1 -Y EXTERNAL -H ldapi:/// -f /root/ldaps.ldif
  command: /usr/bin/ldapmodify -v -d1 -Y EXTERNAL -f /root/ldaps.ldif
  notify:
    - Restart OpenLDAP