ansible_modules
ansible_modules copied to clipboard
[Bug]: nb_inventory does not allow query_filter for status "paused"
Ansible NetBox Collection version
v3.21.0
Ansible version
"ansible [core 2.17.13]
config file = /app/rhrz-iss-orchestration/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True"
NetBox version
v4.3.6
Python version
3.11
Steps to Reproduce
Add the following query_filter to nb_inventory:
plugin: netbox.netbox.nb_inventory
[...]
query_filters:
- status: paused
Saving and showing the ansible inventory prints error message (see below).
ansible-inventory --list
Expected Behavior
Inventory is shown and hosts with status "paused" are part of it
Observed Behavior
Error message:
[WARNING]: * Failed to parse /etc/ansible/nb_inventory.yml with auto plugin: {"status":["Select a valid choice. paused is not one
of the available choices."]}
[WARNING]: * Failed to parse /etc/ansible/nb_inventory.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory
[WARNING]: * Failed to parse /etc/ansible/nb_inventory.yml with ini plugin: Invalid host pattern 'plugin:' supplied, ending in ':'
is not allowed, this character is reserved to provide a port.
[WARNING]: Unable to parse /etc/ansible/nb_inventory.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
Inventory is empty after change.