mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix openstack inventory for multiple servers
Fix openstack inventory for when we have multiple servers with the same name but different IDs. Instead of giving every server with the same name the details for the first server returned with that name add the individual servers as they are returned. This was a logic bug where in a loop over a list of servers we always added the first server in that list despite having more than one server.
This commit is contained in:
parent
6b1b4e03b0
commit
7d5650219d
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ def get_host_groups_from_cloud(inventory):
|
|||
else:
|
||||
for server in servers:
|
||||
append_hostvars(
|
||||
hostvars, groups, server['id'], servers[0],
|
||||
hostvars, groups, server['id'], server,
|
||||
namegroup=True)
|
||||
groups['_meta'] = {'hostvars': hostvars}
|
||||
return groups
|
||||
|
|
Loading…
Reference in a new issue