Return secgroup, not just id

reviewable/pr18780/r1
Monty Taylor 10 years ago
parent 351fca028f
commit ef22008cac

@ -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…
Cancel
Save