mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 14:50:02 -07:00
Proxmox inventory filters (#4352)
* Proxmox inventory plugin - Initial implementation of filters * This is an attempt at implementing something that would satisfy issue #3553 * A rather massive code rewrite was needed as adding the host to the inventory, setting its variables and adding it to various groups used to be done as soon as the information became available. This is not possible when it is not known whether the host should be added to the inventory before all data has been gathered. * The code for both LXC containers and Qemu VMs was refactored into a single loop. * Helper functions to generate group and fact names were added. * Proxmox inventory plugin - Warnings for filter errors * When an error occurs while compositing a filter's value and strict mode is disabled, display a warning. * Proxmox inventory plugin - Fixed pool groups building * Hosts that were excluded by the host filters were still being added to pool groups, causing errors. * Proxmox inventory plugin - Refactoring * Split off the VM/container handling code from the `_populate()` method * Split off pool group attribution from the `_populate()` method * Proxmox inventory filters - Changelog fragment * proxmox inventory - Simplify _can_add_host() method Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
85925eabea
commit
761171b532
3 changed files with 150 additions and 124 deletions
4
changelogs/fragments/4352-proxmox-inventory-filters.yml
Normal file
4
changelogs/fragments/4352-proxmox-inventory-filters.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
minor_changes:
|
||||
- proxmox inventory plugin - add support for client-side jinja filters
|
||||
(https://github.com/ansible-collections/community.general/issues/3553).
|
Loading…
Add table
Add a link
Reference in a new issue