mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Remove 'result' value
This value is pretty much useless, and a holdover from the old module code. Let's remove it.
This commit is contained in:
parent
eb2f3c8a44
commit
6527f895a1
1 changed files with 5 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue