Bug 1719303

Summary: ovirt_host_facts returns more on cluster element than needed
Product: Red Hat Enterprise Virtualization Manager Reporter: Lucie Leistnerova <lleistne>
Component: ansibleAssignee: Martin Necas <mnecas>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.3.4CC: mperina, omachace, pelauter
Target Milestone: ovirt-4.3.5Keywords: Automation, ZStream
Target Release: 4.3.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-2.8.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-15 12:36:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lucie Leistnerova 2019-06-11 13:11:39 UTC
Description of problem:
Module ovirt_host_facts returns more on <cluster> than needed when not nested.

Version-Release number of selected component (if applicable):
ansible-2.8.0-0.9.rc3.el7ae.noarch

How reproducible:always


Steps to Reproduce:
1. run playbook like:
      ovirt_host_facts:
        auth: "{{ ovirt_auth }}"
        pattern: "name=vhost*"
        fetch_nested: True
        nested_attributes:
          - name

returns correctly:

            "cluster": {
                "href": "/ovirt-engine/api/clusters/87c0c65c-f3b1-11e8-9209-001a4a013f36",
                "id": "87c0c65c-f3b1-11e8-9209-001a4a013f36",
                "name": "Default"
            },

2. run the same playbook with fetch_nested: False


Actual results: cluster with all information
          "cluster": {
                "affinity_groups": [],
                "ballooning_enabled": false,
                "comment": "",
                "cpu": {
                    "architecture": "x86_64",
                    "type": "Intel Westmere Family"
                },
....


Expected results:
            "cluster": {
                "href": "/ovirt-engine/api/clusters/87c0c65c-f3b1-11e8-9209-001a4a013f36",
                "id": "87c0c65c-f3b1-11e8-9209-001a4a013f36",
            },


Additional info:
In module ovirt_vm_facts it works as expected.

Comment 2 Lucie Leistnerova 2019-07-15 06:53:37 UTC
Verified in ansible-2.8.2-1.el7ae.noarch

Comment 3 Martin Perina 2019-07-15 12:36:30 UTC
Released as a part of Ansible Engine 2.8.2 in https://errata.devel.redhat.com/advisory/43959