Clarify docs/examples of attribute removal (#35872)

If values="somestring" is specified then this module normalizes it to
["somestring"]. This means that passing name="foo", values="",
state=exact results in the ldap entry having a single attribute called
foo="".

To delete all attributes "foo", regardless of their values, it is
necessary to pass name="foo", values=[], state="exact".
This commit is contained in:
Alex Willmer 2018-08-29 21:39:37 +01:00 committed by Alicia Cozine
parent 149aa767ff
commit 490c7e7b35

View file

@ -54,7 +54,7 @@ options:
values will be added if they're missing. If C(absent), all given
values will be removed if present. If C(exact), the set of values
will be forced to exactly those provided and no others. If
I(state=exact) and I(value) is empty, all values for this
I(state=exact) and I(value) is an empty list, all values for this
attribute will be removed.
choices: [present, absent, exact]
default: present
@ -117,7 +117,7 @@ EXAMPLES = """
ldap_attr:
dn: uid=jdoe,ou=people,dc=example,dc=com
name: shadowExpire
values: ""
values: []
state: exact
server_uri: ldap://localhost/
bind_dn: cn=admin,dc=example,dc=com
@ -135,7 +135,7 @@ EXAMPLES = """
ldap_attr:
dn: uid=jdoe,ou=people,dc=example,dc=com
name: shadowExpire
values: ""
values: []
state: exact
params: "{{ ldap_auth }}"
"""