From d73f5a4adbaac2591e2a00f4e17dbae854c73765 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Thu, 22 Oct 2015 13:27:17 -0400 Subject: [PATCH] return information about created subnet make os_subnet behave like os_network in terms of returning information about the created resource. With this commit, os_subnet will return the created subnet in `subnet` and the subnet id in `id`. --- cloud/openstack/os_subnet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud/openstack/os_subnet.py b/cloud/openstack/os_subnet.py index d54268f415a..1913d95ce7e 100644 --- a/cloud/openstack/os_subnet.py +++ b/cloud/openstack/os_subnet.py @@ -302,7 +302,9 @@ def main(): changed = True else: changed = False - module.exit_json(changed=changed) + module.exit_json(changed=changed, + subnet=subnet, + id=subnet['id']) elif state == 'absent': if not subnet: