cloudstack: cs_role: fix UnboundLocalError in check mode
This commit is contained in:
parent
3a1b84153c
commit
6d81c9670f
1 changed files with 5 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue