mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
Fix inventory: server type had the wrong value (#78)
This commit is contained in:
parent
c46d09bda5
commit
45af6f150c
2 changed files with 5 additions and 3 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- inventory fix image name was set as server type instead of the correct server type
|
|
@ -210,10 +210,10 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
|||
"You can only connect via private IPv4 if you specify a network")
|
||||
|
||||
# Server Type
|
||||
if server.image is not None and server.image.name is not None:
|
||||
self.inventory.set_variable(server.name, "server_type", to_native(server.image.name))
|
||||
if server.server_type is not None:
|
||||
self.inventory.set_variable(server.name, "server_type", to_native(server.server_type.name))
|
||||
else:
|
||||
self.inventory.set_variable(server.name, "server_type", to_native("No Image name found."))
|
||||
self.inventory.set_variable(server.name, "server_type", to_native("No server type name found."))
|
||||
|
||||
# Datacenter
|
||||
self.inventory.set_variable(server.name, "datacenter", to_native(server.datacenter.name))
|
||||
|
|
Loading…
Reference in a new issue