ovirt: ovirt_hosts_facts: add all_content (#43525)

Add all_content parameter also to ovirt_hosts_facts
to fetch the complete list of of details.
pull/43717/head
Simone Tiraboschi 6 years ago committed by ansibot
parent d971dd23a4
commit 086cb0233f

@ -41,6 +41,12 @@ options:
- "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 @@ from ansible.module_utils.ovirt import (
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(

Loading…
Cancel
Save