hcloud: inventory: missing compose variables (#64559)

This commit is contained in:
Martin Westergaard Lassen 2019-11-18 13:54:36 +01:00 committed by René Moser
parent 13a8dbfd5c
commit c9d3c9e233
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- hcloud - Added missing host variables in Compose section

View file

@ -208,7 +208,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
strict = self.get_option('strict')
# Composed variables
self._set_composite_vars(self.get_option('compose'), {}, server.name, strict=strict)
self._set_composite_vars(self.get_option('compose'), self.inventory.get_host(server.name).get_vars(), server.name, strict=strict)
# Complex groups based on jinja2 conditionals, hosts that meet the conditional are added to group
self._add_host_to_composed_groups(self.get_option('groups'), {}, server.name, strict=strict)