mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Return secgroup, not just id
This commit is contained in:
parent
cc214afed6
commit
89f95471f8
1 changed files with 4 additions and 2 deletions
|
@ -118,12 +118,14 @@ def main():
|
||||||
if state == 'present':
|
if state == 'present':
|
||||||
if not secgroup:
|
if not secgroup:
|
||||||
secgroup = cloud.create_security_group(name, description)
|
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:
|
else:
|
||||||
if _needs_update(module, secgroup):
|
if _needs_update(module, secgroup):
|
||||||
secgroup = cloud.update_security_group(
|
secgroup = cloud.update_security_group(
|
||||||
secgroup['id'], description=description)
|
secgroup['id'], description=description)
|
||||||
module.exit_json(changed=True, id=secgroup['id'])
|
module.exit_json(
|
||||||
|
changed=True, id=secgroup.id, secgroup=secgroup)
|
||||||
else:
|
else:
|
||||||
module.exit_json(changed=False)
|
module.exit_json(changed=False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue