This commit is contained in:
2026-01-25 00:41:19 -07:00
parent cfe3ecf85f
commit c9157bc933
4 changed files with 12 additions and 12 deletions

View File

@@ -1,10 +1,10 @@
- name: Find main LDAP database DN
ansible.builtin.command: >
command: >
ldapsearch -Y EXTERNAL -H ldapi:/// \
-b cn=config '(olcSuffix={{ ldap_basedn }})' dn
register: ldap_db_dn
changed_when: false
- name: Set fact for main database DN
ansible.builtin.set_fact:
set_fact:
ldap_main_db_dn: "{{ ldap_db_dn.stdout_lines | select('match','^dn:') | first | regex_replace('^dn: ','') }}"