mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Don't know why this works but it does.
Plugin was crashing on this line on Python 3.9.2 deployed on qemu image with debian bullseye. It doesn't crash anymore.
* Create 3052_proxmox_inventory_plugin.yml
* Update changelogs/fragments/3052_proxmox_inventory_plugin.yml
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
(cherry picked from commit 99c28313e4
)
Co-authored-by: The Right Honourable Reverend <samueljsmith@gmail.com>
This commit is contained in:
parent
8da1ff3c90
commit
172e8bb161
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/3052_proxmox_inventory_plugin.yml
Normal file
2
changelogs/fragments/3052_proxmox_inventory_plugin.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- proxmox inventory plugin - fixed plugin failure when a ``qemu`` guest has no ``template`` key (https://github.com/ansible-collections/community.general/pull/3052).
|
|
@ -413,7 +413,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||||
node_qemu_group = self.to_safe('%s%s' % (self.get_option('group_prefix'), ('%s_qemu' % node['node']).lower()))
|
node_qemu_group = self.to_safe('%s%s' % (self.get_option('group_prefix'), ('%s_qemu' % node['node']).lower()))
|
||||||
self.inventory.add_group(node_qemu_group)
|
self.inventory.add_group(node_qemu_group)
|
||||||
for qemu in self._get_qemu_per_node(node['node']):
|
for qemu in self._get_qemu_per_node(node['node']):
|
||||||
if qemu['template']:
|
if qemu.get('template'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.inventory.add_host(qemu['name'])
|
self.inventory.add_host(qemu['name'])
|
||||||
|
|
Loading…
Reference in a new issue