mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +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…
Add table
Add a link
Reference in a new issue