From 6527f895a1a2afbaa2a8e125804f40489cf9a1a5 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Wed, 10 Jun 2015 14:02:37 -0400 Subject: [PATCH] Remove 'result' value This value is pretty much useless, and a holdover from the old module code. Let's remove it. --- .../modules/cloud/openstack/os_security_group.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_security_group.py b/lib/ansible/modules/cloud/openstack/os_security_group.py index bf316962a39..4aaff2470d6 100644 --- a/lib/ansible/modules/cloud/openstack/os_security_group.py +++ b/lib/ansible/modules/cloud/openstack/os_security_group.py @@ -118,23 +118,21 @@ def main(): if state == 'present': if not secgroup: secgroup = cloud.create_security_group(name, description) - module.exit_json(changed=True, result='created', - id=secgroup['id']) + module.exit_json(changed=True, id=secgroup['id']) else: if _needs_update(module, secgroup): secgroup = cloud.update_security_group( secgroup['id'], description=description) - module.exit_json(changed=True, result='updated', - id=secgroup['id']) + module.exit_json(changed=True, id=secgroup['id']) else: - module.exit_json(changed=False, result='success') + module.exit_json(changed=False) if state == 'absent': if not secgroup: - module.exit_json(changed=False, result='success') + module.exit_json(changed=False) else: cloud.delete_security_group(secgroup['id']) - module.exit_json(changed=True, result='deleted') + module.exit_json(changed=True) except shade.OpenStackCloudException as e: module.fail_json(msg=e.message)