From bdd73fdfd06c0628c8a3cd0d494956bb87276850 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Thu, 22 Oct 2015 13:56:56 -0400 Subject: [PATCH] make os_flavor return a top-level 'id' key make os_flavor return a top-level 'id' key, much like other os_* resources. --- lib/ansible/modules/cloud/openstack/os_nova_flavor.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_nova_flavor.py b/lib/ansible/modules/cloud/openstack/os_nova_flavor.py index 82b3a53aa3..f792403046 100644 --- a/lib/ansible/modules/cloud/openstack/os_nova_flavor.py +++ b/lib/ansible/modules/cloud/openstack/os_nova_flavor.py @@ -217,8 +217,13 @@ def main(): rxtx_factor=module.params['rxtx_factor'], is_public=module.params['is_public'] ) - module.exit_json(changed=True, flavor=flavor) - module.exit_json(changed=False, flavor=flavor) + changed=True + else: + changed=False + + module.exit_json(changed=changed, + flavor=flavor, + id=flavor['id']) elif state == 'absent': if flavor: