ovirt.ovirt.filtervalue filter – Filter to findall occurance of some value in dict
Note
This filter plugin is part of the ovirt.ovirt collection (version 3.2.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install ovirt.ovirt
.
To use it in a playbook, specify: ovirt.ovirt.filtervalue
.
Synopsis
Filter to findall occurance of some value in dict
Input
This describes the input of the filter, the value before | ovirt.ovirt.filtervalue
.
Parameter |
Comments |
---|---|
List of VMs |
Positional parameters
This describes positional parameters of the filter. These are the values positional1
, positional2
and so on in the following
example: input | ovirt.ovirt.filtervalue(positional1, positional2, ...)
Parameter |
Comments |
---|---|
Attribute to sotr by |
|
List of VMs |
Examples
- name: Set filtred ovirt_vms
ansible.builtin.set_fact:
ovirt_vms: "{{ vms | ovirt.ovirt.filtervalue('name', item.name) }}"
Return Value
Key |
Description |
---|---|
Filtred VMs Returned: success |