Open dnmvisser opened 1 year ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @drybjed @jtyr @noles click here for bot help
I think you can use state=exact
and provide the value []
for the attribute to remove it completely without knowing its value. See also the examples of the module, the task with name Remove specified attribute(s) from an entry
.
hi @dnmvisser just out of curiosity: are you able to remove it using the LDIF and the command line? Just making sure that OpenLDAP is not the issue here.
Summary
I am trying to remove an attribute from an LDAP entry, in this case the password that was put in during installation of the
slapd
package on Debian. Initially I have this in my config database:I am looking to remove the
olcRootPW
attribute entirely (in my example we're not going to use it, so we'd rather remove it to avoid it being (ab)used unintentionally).I can't use
community.general.ldap_entry
because that can only remove entire entries. According to thecommunity.general.ldap_attrs
docs , this can "Add or remove multiple LDAP attribute values". Which seems like what I need.But according to https://docs.ansible.com/ansible/latest/collections/community/general/ldap_attrs_module.html#parameter-attributes:
That works, but I need to supply both the attribute and its value. I cannot seem to remove the attribute without supplying its value. Workarounds could be:
But, since the LDIF to remove the attribute is pretty trivial:
I am thinking this could well be supported by the
ldap_attrs
module?There is a possibility that the module does in fact already support what I'm after - in that case it's probably a matter of documentation...
Issue Type
Feature Idea
Component Name
ldap_attrs
Additional Information
Code of Conduct