server.security_groups is a list of dicts (#48798)

os_server was trying to access `[sg.name for sg in
server.security_groups]`, but the items in `server.security_groups`
are dictionaries, so that should be `sg['name']`.
pull/49290/head
Lars Kellogg-Stedman 6 years ago committed by ansibot
parent 95718f7e12
commit b2e5c75131

@ -625,7 +625,7 @@ def _check_security_groups(module, cloud, server):
return changed, server
module_security_groups = set(module.params['security_groups'])
server_security_groups = set(sg.name for sg in server.security_groups)
server_security_groups = set(sg['name'] for sg in server.security_groups)
add_sgs = module_security_groups - server_security_groups
remove_sgs = server_security_groups - module_security_groups

Loading…
Cancel
Save