mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
cloudstack: cs_role: fix UnboundLocalError in check mode
This commit is contained in:
@@ -171,11 +171,11 @@ class AnsibleCloudStackRole(AnsibleCloudStack):
|
||||
res = self.cs.updateRole(**args)
|
||||
if 'errortext' in res:
|
||||
self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
|
||||
# The API as in 4.9 does not return an updated role yet
|
||||
if 'role' not in res:
|
||||
role = self.get_role()
|
||||
else:
|
||||
role = res['role']
|
||||
# The API as in 4.9 does not return an updated role yet
|
||||
if 'role' not in res:
|
||||
role = self.get_role()
|
||||
else:
|
||||
role = res['role']
|
||||
return role
|
||||
|
||||
def absent_role(self):
|
||||
|
||||
Reference in New Issue
Block a user