From ef22008cac3dae41d7318cc9b110b8c32925ccc4 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 17 Jun 2015 04:20:42 -0400 Subject: [PATCH] Return secgroup, not just id --- cloud/openstack/os_security_group.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cloud/openstack/os_security_group.py b/cloud/openstack/os_security_group.py index a3d1262d6fe..67730a252f1 100644 --- a/cloud/openstack/os_security_group.py +++ b/cloud/openstack/os_security_group.py @@ -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)