From 1a31f62a6f63689ea2f35775cc1d16c446078b96 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman <rjeffman@redhat.com> Date: Wed, 27 Apr 2022 11:26:32 -0300 Subject: [PATCH] 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'. --- plugins/modules/ipaautomountmap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/ipaautomountmap.py b/plugins/modules/ipaautomountmap.py index 8f990d24..67857c62 100644 --- a/plugins/modules/ipaautomountmap.py +++ b/plugins/modules/ipaautomountmap.py @@ -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) -- GitLab