Ansible: How to create a policy with module univention_directory_manager?

Hi,
I try to create a policy with ansible via:

  - name: Erstelle Policy f. Verwaltungs-Server
    delegate_to: "PRIMARY" 
    univention.ucs_modules.univention_directory_manager:
      module: "policies/registry" 
      state: "present" 
      position: "cn=policies,{{ OUDN }}" 
      dn: "cn=ou-default-verw-policy,cn=policies,{{ OUDN }}" 
      set_properties:
        - property: "name" 
          value: "ou-default-verw-policy" 
        - property: "registry" 
          value: 
            ldap/server/name: "{{ SERVER }}.edu.silk-it.de"

It doesn’t throw an error message, but the policy is not created either.
Worse: when that policy already exists, it throws an error and doesn’t continue the playbook.

  • Is there a switch for “–ignore_exists” as in udm? I presumed “state: present” would automatically take care of it…
  • What’s wrong with the code above, why does it not create that policy?

I’m using UCS: 5.0-7 errata1011 and version 3.1.0 of the univention-ucs_modules

TIA,
Jens-Peter

Mastodon