Repository: ansible/ansible

Issue:
Missing all_content param in ovirt_hosts_facts
##### SUMMARY
ovirt_hosts_facts misses the all_content param and so it's not possible to get back the whole host details. ovirt_vms_facts list, for instance, has it.

##### ISSUE TYPE
 - Bug Report

##### COMPONENT NAME
ovirt_hosts_facts

##### ANSIBLE VERSION
```
ansible 2.6.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/stirabos/.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.15 (default, May 16 2018, 17:50:09) [GCC 8.1.1 20180502 (Red Hat 8.1.1-1)]
```

##### CONFIGURATION


##### OS / ENVIRONMENT
N/A

##### STEPS TO REPRODUCE
<!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used. -->

<!--- Paste example playbooks or commands between quotes below -->
```yaml
    - ovirt_vms_facts:
        auth: "{{ ovirt_auth }}"
        all_content: true
    - debug: var=ovirt_vms
    - ovirt_hosts_facts:
        auth: "{{ ovirt_auth }}"
        all_content: true
    - debug: var=ovirt_hosts
```

##### EXPECTED RESULTS
a list of hosts with full detail for each of them

##### ACTUAL RESULTS
```
TASK [ovirt_hosts_facts] ******************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ovirt_hosts_facts) module: all_content Supported parameters include: auth, fetch_nested, nested_attributes, pattern"}
	to retry, use: --limit @/root/test.retry
```



Discussion:
Files identified in the description:
* [lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py)

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @machacekondra @mwperina
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py
--- a/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py
+++ b/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py
@@ -41,6 +41,12 @@
         - "Search term which is accepted by oVirt/RHV search backend."
         - "For example to search host X from datacenter Y use following pattern:
            name=X and datacenter=Y"
+    all_content:
+      description:
+        - "If I(true) all the attributes of the hosts should be
+           included in the response."
+      default: False
+      version_added: "2.7"
 extends_documentation_fragment: ovirt_facts
 '''
 
@@ -78,6 +84,7 @@
 def main():
     argument_spec = ovirt_facts_full_argument_spec(
         pattern=dict(default='', required=False),
+        all_content=dict(default=False, type='bool'),
     )
     module = AnsibleModule(argument_spec)
     check_sdk(module)
@@ -86,7 +93,10 @@ def main():
         auth = module.params.pop('auth')
         connection = create_connection(auth)
         hosts_service = connection.system_service().hosts_service()
-        hosts = hosts_service.list(search=module.params['pattern'])
+        hosts = hosts_service.list(
+            search=module.params['pattern'],
+            all_content=module.params['all_content'],
+        )
         module.exit_json(
             changed=False,
             ansible_facts=dict(


Test patch: