ovirt.ovirt.ovirtvmipsv4 filter – VM IPv4

Note

This filter plugin is part of the ovirt.ovirt collection (version 2.4.1).

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.ovirtvmipsv4.

Synopsis

  • VM IPv4

Input

This describes the input of the filter, the value before | ovirt.ovirt.ovirtvmipsv4.

Parameter

Comments

Input

list / elements=string / required

List of VMs

Keyword parameters

This describes keyword parameters of the filter. These are the values key1=value1, key2=value2 and so on in the following example: input | ovirt.ovirt.ovirtvmipsv4(key1=value1, key2=value2, ...).

Parameter

Comments

attr

list / elements=string

Attribute by which the

network_ip

string

Filter the IPs by network address

Examples

- name: Print VM all IPv4
  debug:
    msg: "{{ vms.ovirt_vms | ovirt.ovirt.ovirtvmipsv4 }}"
- name: Print VM all IPv4
  debug:
    msg: "{{ vms.ovirt_vms | ovirt.ovirt.ovirtvmipsv4(attr='name') }}"

Return Value

Key

Description

Return value

list / elements=string

VM IPv4

Returned: success

Authors

  • Martin Necas (@mnecas)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.