1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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']`.
This commit is contained in:
Lars Kellogg-Stedman 2018-11-30 06:42:50 -05:00 committed by ansibot
parent 95718f7e12
commit b2e5c75131

View file

@ -625,7 +625,7 @@ def _check_security_groups(module, cloud, server):
return changed, server return changed, server
module_security_groups = set(module.params['security_groups']) 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 add_sgs = module_security_groups - server_security_groups
remove_sgs = server_security_groups - module_security_groups remove_sgs = server_security_groups - module_security_groups