mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-26 21:43:02 +00:00
Allow munch results in server_info module
Certain branches of the openstacksdk are explicitly converting `Resource` objects to munch objects to add additional virtual properties. This means that the module may receive `Resource` or a `Munch` object. Add a small check. Change-Id: I413877128d1e2b68d7f39420d19e2560d3d9a99e
This commit is contained in:
@@ -377,7 +377,9 @@ class ServerInfoModule(OpenStackModule):
|
||||
kwargs['name_or_id'] = self.params['name']
|
||||
|
||||
self.exit(changed=False,
|
||||
servers=[server.to_dict(computed=False) for server in
|
||||
servers=[server.to_dict(computed=False)
|
||||
if hasattr(server, "to_dict") else server
|
||||
for server in
|
||||
self.conn.search_servers(**kwargs)])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user