Skip to content
Snippets Groups Projects
Commit a83bab94 authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

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.
parent 70f4b7d6
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -71,6 +71,24 @@
register: result
failed_when: result.failed or result.changed
- name: ensure map TestMap has an empty description
ipaautomountmap:
ipaadmin_password: SomeADMINpassword
name: TestMap
location: TestLocation
desc: ""
register: result
failed_when: result.failed or not result.changed
- name: ensure map TestMap has an empty description, again
ipaautomountmap:
ipaadmin_password: SomeADMINpassword
name: TestMap
location: TestLocation
desc: ""
register: result
failed_when: result.failed or result.changed
- name: ensure map TestMap is removed
ipaautomountmap:
ipaadmin_password: SomeADMINpassword
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment