|
|
@ -41,6 +41,12 @@ options:
|
|
|
|
- "Search term which is accepted by oVirt/RHV search backend."
|
|
|
|
- "Search term which is accepted by oVirt/RHV search backend."
|
|
|
|
- "For example to search host X from datacenter Y use following pattern:
|
|
|
|
- "For example to search host X from datacenter Y use following pattern:
|
|
|
|
name=X and datacenter=Y"
|
|
|
|
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
|
|
|
|
extends_documentation_fragment: ovirt_facts
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
@ -78,6 +84,7 @@ from ansible.module_utils.ovirt import (
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
argument_spec = ovirt_facts_full_argument_spec(
|
|
|
|
argument_spec = ovirt_facts_full_argument_spec(
|
|
|
|
pattern=dict(default='', required=False),
|
|
|
|
pattern=dict(default='', required=False),
|
|
|
|
|
|
|
|
all_content=dict(default=False, type='bool'),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
module = AnsibleModule(argument_spec)
|
|
|
|
module = AnsibleModule(argument_spec)
|
|
|
|
check_sdk(module)
|
|
|
|
check_sdk(module)
|
|
|
@ -86,7 +93,10 @@ def main():
|
|
|
|
auth = module.params.pop('auth')
|
|
|
|
auth = module.params.pop('auth')
|
|
|
|
connection = create_connection(auth)
|
|
|
|
connection = create_connection(auth)
|
|
|
|
hosts_service = connection.system_service().hosts_service()
|
|
|
|
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(
|
|
|
|
module.exit_json(
|
|
|
|
changed=False,
|
|
|
|
changed=False,
|
|
|
|
ansible_facts=dict(
|
|
|
|
ansible_facts=dict(
|
|
|
|