mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
fix!: don't set inventory image vars if server image is undefined (#275)
Related to #116 Don't set "No Image * found" string if the server image is not defined. This is not an intuitive behavior. This is a breaking change.
This commit is contained in:
parent
c15377c672
commit
652a41df9d
2 changed files with 4 additions and 4 deletions
|
@ -0,0 +1,4 @@
|
|||
breaking_changes:
|
||||
- >
|
||||
inventory plugin - Don't set the server image variables (`image_id`,
|
||||
`image_os_flavor` and `image_name`) when the server image is not defined.
|
|
@ -270,10 +270,6 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
|||
self.inventory.set_variable(server.name, "image_name", to_native(server.image.name))
|
||||
else:
|
||||
self.inventory.set_variable(server.name, "image_name", to_native(server.image.description))
|
||||
else:
|
||||
self.inventory.set_variable(server.name, "image_id", to_native("No Image ID found"))
|
||||
self.inventory.set_variable(server.name, "image_name", to_native("No Image Name found"))
|
||||
self.inventory.set_variable(server.name, "image_os_flavor", to_native("No Image OS Flavor found"))
|
||||
|
||||
# Labels
|
||||
self.inventory.set_variable(server.name, "labels", dict(server.labels))
|
||||
|
|
Loading…
Reference in a new issue