our base dn doesn't exist apparently

This commit is contained in:
Jonathan DeMasi
2026-01-24 17:09:16 -07:00
parent 16b86e616a
commit 8a2b513e3b

View File

@@ -1,3 +1,20 @@
- name: Ensure base DN exists
community.general.ldap_entry:
dn: "{{ ldap_basedn }}"
state: present
objectClass:
- top
- dcObject
- organization
attributes:
dc: "{{ ldap_basedn.split(',')[0].split('=')[1] }}"
o: "{{ ldap_org_name }}"
args:
server_uri: "{{ ldap_uri }}"
bind_dn: "{{ ldap_directory_bind_dn }}"
bind_pw: "{{ ldap_directory_bind_pw }}"
start_tls: yes
- name: Create base OUs
community.general.ldap_entry:
dn: "{{ item }}"