mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-03 23:14:02 -07:00
[PR #10727/6f40eff6 backport][stable-11] simplify string formatting in some modules (#10773)
simplify string formatting in some modules (#10727)
* simplify string formatting in some modules
* add changelog frag
(cherry picked from commit 6f40eff632
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
144945894f
commit
25ffe69b51
10 changed files with 23 additions and 13 deletions
|
@ -251,7 +251,7 @@ class ManageIQgroup(object):
|
|||
if not tenant_res:
|
||||
self.module.fail_json(msg="Tenant '%s' not found in manageiq" % tenant_name)
|
||||
if len(tenant_res) > 1:
|
||||
self.module.fail_json(msg="Multiple tenants found in manageiq with name '%s" % tenant_name)
|
||||
self.module.fail_json(msg="Multiple tenants found in manageiq with name '%s'" % tenant_name)
|
||||
tenant = tenant_res[0]
|
||||
return tenant
|
||||
else:
|
||||
|
@ -276,7 +276,7 @@ class ManageIQgroup(object):
|
|||
if not role_res:
|
||||
self.module.fail_json(msg="Role '%s' not found in manageiq" % role_name)
|
||||
if len(role_res) > 1:
|
||||
self.module.fail_json(msg="Multiple roles found in manageiq with name '%s" % role_name)
|
||||
self.module.fail_json(msg="Multiple roles found in manageiq with name '%s'" % role_name)
|
||||
return role_res[0]
|
||||
else:
|
||||
# No role name or role id supplied
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue