|
|
@ -117,12 +117,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)
|
|
|
|
|
|
|
|
|
|
|
|