Return secgroup, not just id
This commit is contained in:
parent
351fca028f
commit
ef22008cac
1 changed files with 4 additions and 2 deletions
|
@ -117,12 +117,14 @@ def main():
|
|||
if state == 'present':
|
||||
if not secgroup:
|
||||
secgroup = cloud.create_security_group(name, description)
|
||||
module.exit_json(changed=True, id=secgroup['id'])
|
||||
module.exit_json(
|
||||
changed=True, id=secgroup.id, secgroup=secgroup)
|
||||
else:
|
||||
if _needs_update(module, secgroup):
|
||||
secgroup = cloud.update_security_group(
|
||||
secgroup['id'], description=description)
|
||||
module.exit_json(changed=True, id=secgroup['id'])
|
||||
module.exit_json(
|
||||
changed=True, id=secgroup.id, secgroup=secgroup)
|
||||
else:
|
||||
module.exit_json(changed=False)
|
||||
|
||||
|
|
Loading…
Reference in a new issue