I’m a little unsure whether this is a feature or a bug. Creating containers whose names have already been used in the LDAP structure is apparently not possible with the Ansible module univention_directory_manager.
Example Code Playbook:
- name: Test nested policy container
hosts: primary
become: yes
vars:
ucs_ldap_base: dc=example,dc=test
tasks:
- name: container BBB in root
univention.ucs_modules.univention_directory_manager:
module: "container/cn"
state: "present"
position: "{{ ucs_ldap_base }}"
set_properties:
- property: name
value: "BBB"
- name: container AAA
univention.ucs_modules.univention_directory_manager:
module: "container/cn"
state: "present"
position: "cn=policies,{{ ucs_ldap_base }}"
set_properties:
- property: name
value: "AAA"
- property: policyPath
value: "1"
- name: container BBB
univention.ucs_modules.univention_directory_manager:
module: "container/cn"
state: "present"
position: "cn=AAA,cn=policies,{{ ucs_ldap_base }}"
set_properties:
- property: name
value: "BBB"
- property: policyPath
value: "1"
The third container under AAA is not generated, if I remove the first Ansible task it is generated.
Any hint ?
UDM commands work as expected.