With ansible 2.10 I use the ldap_attrs module to enable the openldap memberof module:
- name: Enable memberof module
ldap_attrs:
dn: cn=module{0},cn=config
attributes:
olcModuleLoad: memberof.so
state: present
The first time the task is executed works well, but if I play the playbook a second time it fails:
fatal: [myserver.mydomain.tld]: FAILED! => {"changed": false, "details": "{'info': u'modify/add: olcModuleLoad: value #0 already exists', 'desc': u'Type or value exists'}", "msg": "Attribute action failed."}
already exists
sounds like something I expect, so I am surprised that it is considered fatal.
Is it an ansible bug, or did I miss something in the configuration?
In september '21 this is not yet supported by ansible.
I could automate the
memberof
andrefint
installation and configuration based on those workarounds: