You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to add/load modules in LDAP using ldap_entry. However, it is not idempotent, since subsequent runs fail with "Entry action failed".
This seems to be due to a failure to detect the original entry, after a list order component ("{n}") is added to the DN in the LDAP database by slapd. I am not sure, but it may have something to do with issue #7646, as some code in ldap_entry expects this list component to immediately follow an equals sign, which in the case of LDAP modules, it doesn't. Example:
I'm kind of confused about this. The problem seems to have been addressed in #5450 , but I'm failing to see the expected behaviour. Perhaps I'm misunderstanding something here.
@mrvanes would you have expected the above example to work after your PR?
The problem is, since the incarnation of my PR's apparently some changes have been added (I never used regex's and did not introduce xorder_discovery parameter?) so not sure where they stand with this plugin at the moment. I do know it still "works for me", whatever that means for whatever ansible version and tasks we use at the moment?
Summary
It is possible to add/load modules in LDAP using
ldap_entry
. However, it is not idempotent, since subsequent runs fail with "Entry action failed".This seems to be due to a failure to detect the original entry, after a list order component ("{n}") is added to the DN in the LDAP database by slapd. I am not sure, but it may have something to do with issue #7646, as some code in
ldap_entry
expects this list component to immediately follow an equals sign, which in the case of LDAP modules, it doesn't. Example:Issue Type
Bug Report
Component Name
community.general.ldap_entry
Ansible Version
Community.general Version
Configuration
$ ansible-config dump --only-changed
OS / Environment
Ubuntu 22.04,
Steps to Reproduce
First run of the above playbook succeeds, creating the following entry:
Subsequent runs produce an error:
Modifying the playbook so that
dn
contains the X order component (i.e.dn: cn=module{1},cn=config
produces the expected behaviour:Expected Results
Ansible detects that the entry already exists, albeit with a list order component in the DN, and continues with the rest of the playbook.
Actual Results
Ansible tries to create the LDAP object and fails due to it already existing.
Code of Conduct
The text was updated successfully, but these errors were encountered: