mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Proxmox inventory plugin: support composite variables (#6641)
* Added composite var support for proxmox inventory plugin * Composite variables support for Proxmox nodes in dynamic inventory plugin Fixes #6640 * Composite variables support for Proxmox nodes in dynamic inventory plugin Fixes #6640 * Added composite var support for proxmox inventory plugin * Added composite var support for proxmox inventory plugin * Update changelogs/fragments/6640-proxmox-composite-variables-support.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
2dbe529a90
commit
1f6d404deb
2 changed files with 7 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
minor_changes:
|
||||
- proxmox inventory plugin - add composite variables support for Proxmox nodes (https://github.com/ansible-collections/community.general/issues/6640).
|
|
@ -590,6 +590,10 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
ip = self._get_node_ip(node['node'])
|
||||
self.inventory.set_variable(node['node'], 'ansible_host', ip)
|
||||
|
||||
# Setting composite variables
|
||||
variables = self.inventory.get_host(node['node']).get_vars()
|
||||
self._set_composite_vars(self.get_option('compose'), variables, node['node'], strict=self.strict)
|
||||
|
||||
# add LXC/Qemu groups for the node
|
||||
for ittype in ('lxc', 'qemu'):
|
||||
node_type_group = self._group('%s_%s' % (node['node'], ittype))
|
||||
|
|
Loading…
Reference in a new issue