Open Daenou opened 8 months ago
in your example you can add a list of to set policies as:
tasks:
- name: "create user"
univention_directory_manager:
module: 'users/user'
state: 'present'
position: 'dc=ucs,dc=test'
policies:
- 'cn=udm-license,cn=operations,cn=UMC,cn=univention,dc=ucs,dc=test'
- 'XY'
set_properties:
- property: 'username'
value: 'testuser1'
- property: 'lastname'
value: 'testuser1'
We should document this.
Today I tried to create and reference a policy with the univention.ucs_modules.univention_directory_manager ansible module, only to find out that the option
--policy-reference
and--policy-dereference
options are not implemented in this module at all.As a workaround, instead of using an ansible shell command I created an extended attribute, so I can reference and dereference policies of groups in this example:
Works fine with this code:
Of course, you'd need additional extended attributes to reference policies to
users/user
andcontainers/ou
objects.Would be nice if this feature would be implemented