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

ipaautomountmap: Fix error messages for invalid 'name' sizes.

This patch fixes the error messages when an invalid number of 'mapname'
are provided for states 'present' or 'absent'.
parent 23e07a9a
No related branches found
No related tags found
No related merge requests found
......@@ -112,12 +112,12 @@ class AutomountMap(IPAAnsibleModule):
state = self.params_get("state")
if state == "present":
if len(name) != 1:
self.fail_json(msg="Exactly one name must be provided \
for state=present.")
self.fail_json(msg="Exactly one name must be provided for"
" 'state: present'.")
if state == "absent":
if len(name) == 0:
self.fail_json(msg="Argument 'map_type' can not be used with "
"state 'absent'")
self.fail_json(msg="At least one 'name' must be provided for"
" 'state: absent'")
invalid = ["desc"]
self.params_fail_used_invalid(invalid, state)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment