ipaautomountmap: Allows clearing description attribute with "".

This change allows clearing automountmap 'description' attribute by
passing an empty string ("") as the playbook parameter.

New test cases were added to check this behavior.
This commit is contained in:
Rafael Guterres Jeffman
2022-02-22 18:09:58 -03:00
parent 70f4b7d646
commit a83bab9425
2 changed files with 20 additions and 1 deletions

View File

@@ -126,7 +126,8 @@ class AutomountMap(IPAAnsibleModule):
_args = {}
if mapname:
_args["automountmapname"] = mapname
if desc:
# An empty string is valid and will clear the attribute.
if desc is not None:
_args["description"] = desc
return _args