Return the secgroup for all present states

pull/18777/head
Monty Taylor 10 years ago committed by Matt Clay
parent b955b2f5c8
commit 4125b576e9

@ -116,18 +116,17 @@ def main():
module.exit_json(changed=_system_state_change(module, secgroup))
if state == 'present':
changed = False
if not secgroup:
secgroup = cloud.create_security_group(name, description)
module.exit_json(
changed=True, id=secgroup.id, secgroup=secgroup)
changed = True
else:
if _needs_update(module, secgroup):
secgroup = cloud.update_security_group(
secgroup['id'], description=description)
module.exit_json(
changed=True, id=secgroup.id, secgroup=secgroup)
else:
module.exit_json(changed=False)
changed = True
module.exit_json(
changed=True, id=secgroup.id, secgroup=secgroup)
if state == 'absent':
if not secgroup:

Loading…
Cancel
Save