Hi Martin
thanks for your information.
but when i try on one of my testlab RHV 4.3 farm, ansible 2.9 complain that ovirt_vm_facts not found, detail refer to below command output
based on RHV 4.3 ansible version as below:
# ansible --version
ansible 2.9.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
# ansible-doc --list | egrep -i ovirt_vm --> not showing ovirt_vm_facts module
[WARNING]: win_template parsing did not produce documentation.
[WARNING]: template parsing did not produce documentation.
ovirt_vm_info Retrieve information about one or more oVirt/RHV virtual machines
ovirt_vmpool Module to manage VM pools in oVirt/RHV
ovirt_vmpool_info Retrieve information about one or more oVirt/RHV vmpools
ovirt_vm Module to manage Virtual Machines in oVirt/RHV
[root@rhvm100 ~]#
#### use ovirt_vms_facts module
# cat list_vms01.yml
- hosts: localhost
connection: local
vars_files:
- engine_vars.yml
- password.yml
tasks:
- name: Obtain SSO token
ovirt_auth:
url: "{{ engine_url }}"
username: "{{ engine_user }}"
password: "{{ engine_password }}"
ca_file: "{{ engine_cafile | default(omit) }}"
# insecure: "{{ engine_insecure }}"
- name: List vms
ovirt_vms_facts: