oVirt: rename _facts -> _info (#61299)
* Rename oVirt _facts -> _info * Adjust PR #. * Forgot update BOTMETA / ignore.txt for doc fragment. * Compatibility for 3rd-party modules using module_utils or info doc fragment. * Update note. * Fix/improve docs. * Update lib/ansible/modules/cloud/ovirt/ovirt_event_info.py Co-Authored-By: Sloane Hertel <shertel@redhat.com> * Fix variable. * Fix return value documentation for ovirt_external_provider_info.
This commit is contained in:
parent
645fe296bd
commit
59ab4d9307
56 changed files with 1091 additions and 716 deletions
2
.github/BOTMETA.yml
vendored
2
.github/BOTMETA.yml
vendored
|
@ -1174,7 +1174,7 @@ files:
|
||||||
$plugins/doc_fragments/ucs.py: *ucs
|
$plugins/doc_fragments/ucs.py: *ucs
|
||||||
$plugins/doc_fragments/vultr.py: *vultr
|
$plugins/doc_fragments/vultr.py: *vultr
|
||||||
$plugins/doc_fragments/ovirt.py: *ovirt
|
$plugins/doc_fragments/ovirt.py: *ovirt
|
||||||
$plugins/doc_fragments/ovirt_facts.py: *ovirt
|
$plugins/doc_fragments/ovirt_info.py: *ovirt
|
||||||
$plugins/doc_fragments/xenserver.py:
|
$plugins/doc_fragments/xenserver.py:
|
||||||
maintainers: bvitnik
|
maintainers: bvitnik
|
||||||
$plugins/doc_fragments/hpe3par.py: *hpe3par
|
$plugins/doc_fragments/hpe3par.py: *hpe3par
|
||||||
|
|
49
changelogs/fragments/61299-ovirt-facts-info.yml
Normal file
49
changelogs/fragments/61299-ovirt-facts-info.yml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
minor_changes:
|
||||||
|
- The ``ovirt_affinity_label_facts`` module has been renamed to ``ovirt_affinity_label_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_api_facts`` module has been renamed to ``ovirt_api_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_cluster_facts`` module has been renamed to ``ovirt_cluster_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_datacenter_facts`` module has been renamed to ``ovirt_datacenter_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_disk_facts`` module has been renamed to ``ovirt_disk_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_event_facts`` module has been renamed to ``ovirt_event_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_external_provider_facts`` module has been renamed to ``ovirt_external_provider_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_group_facts`` module has been renamed to ``ovirt_group_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_host_facts`` module has been renamed to ``ovirt_host_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_host_storage_facts`` module has been renamed to ``ovirt_host_storage_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_network_facts`` module has been renamed to ``ovirt_network_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_nic_facts`` module has been renamed to ``ovirt_nic_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_permission_facts`` module has been renamed to ``ovirt_permission_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_quota_facts`` module has been renamed to ``ovirt_quota_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_scheduling_policy_facts`` module has been renamed to ``ovirt_scheduling_policy_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_snapshot_facts`` module has been renamed to ``ovirt_snapshot_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_storage_domain_facts`` module has been renamed to ``ovirt_storage_domain_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_storage_template_facts`` module has been renamed to ``ovirt_storage_template_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_storage_vm_facts`` module has been renamed to ``ovirt_storage_vm_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_tag_facts`` module has been renamed to ``ovirt_tag_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_template_facts`` module has been renamed to ``ovirt_template_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_user_facts`` module has been renamed to ``ovirt_user_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_vm_facts`` module has been renamed to ``ovirt_vm_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
- The ``ovirt_vmpool_facts`` module has been renamed to ``ovirt_vmpool_info``.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
|
@ -15,7 +15,7 @@ Naming
|
||||||
- All modules should start with an ``ovirt_`` prefix.
|
- All modules should start with an ``ovirt_`` prefix.
|
||||||
- All modules should be named after the resource it manages in singular
|
- All modules should be named after the resource it manages in singular
|
||||||
form.
|
form.
|
||||||
- All modules that gather facts should have a ``_facts``
|
- All modules that gather information should have a ``_info``
|
||||||
suffix.
|
suffix.
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
@ -38,12 +38,12 @@ Libraries
|
||||||
---------
|
---------
|
||||||
|
|
||||||
- All modules should use ``ovirt_full_argument_spec`` or
|
- All modules should use ``ovirt_full_argument_spec`` or
|
||||||
``ovirt_facts_full_argument_spec`` to pick up the standard input (such
|
``ovirt_info_full_argument_spec`` to pick up the standard input (such
|
||||||
as auth and ``fetch_nested``).
|
as auth and ``fetch_nested``).
|
||||||
- All modules should use ``extends_documentation_fragment``: ovirt to go
|
- All modules should use ``extends_documentation_fragment``: ovirt to go
|
||||||
along with ``ovirt_full_argument_spec``.
|
along with ``ovirt_full_argument_spec``.
|
||||||
- All facts modules should use ``extends_documentation_fragment``:
|
- All info modules should use ``extends_documentation_fragment``:
|
||||||
``ovirt_facts`` to go along with ``ovirt_facts_full_argument_spec``.
|
``ovirt_info`` to go along with ``ovirt_info_full_argument_spec``.
|
||||||
- Functions that are common to all modules should be implemeneted in the
|
- Functions that are common to all modules should be implemeneted in the
|
||||||
``module_utils/ovirt.py`` file, so they can be reused.
|
``module_utils/ovirt.py`` file, so they can be reused.
|
||||||
- Python SDK version 4 must be used.
|
- Python SDK version 4 must be used.
|
||||||
|
|
|
@ -525,6 +525,78 @@ be removed in Ansible 2.13. Please update update your playbooks accordingly.
|
||||||
* The ``os_user_facts`` module was renamed to :ref:`os_user_info <os_user_info_module>`.
|
* The ``os_user_facts`` module was renamed to :ref:`os_user_info <os_user_info_module>`.
|
||||||
When called with the new name, the module no longer returns ``ansible_facts``.
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
To access return values, :ref:`register a variable <registered_variables>`.
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_affinity_label_facts`` module was renamed to :ref:`ovirt_affinity_label_info <ovirt_affinity_label_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_api_facts`` module was renamed to :ref:`ovirt_api_info <ovirt_api_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_cluster_facts`` module was renamed to :ref:`ovirt_cluster_info <ovirt_cluster_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_datacenter_facts`` module was renamed to :ref:`ovirt_datacenter_info <ovirt_datacenter_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_disk_facts`` module was renamed to :ref:`ovirt_disk_info <ovirt_disk_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_event_facts`` module was renamed to :ref:`ovirt_event_info <ovirt_event_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_external_provider_facts`` module was renamed to :ref:`ovirt_external_provider_info <ovirt_external_provider_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_group_facts`` module was renamed to :ref:`ovirt_group_info <ovirt_group_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_host_facts`` module was renamed to :ref:`ovirt_host_info <ovirt_host_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_host_storage_facts`` module was renamed to :ref:`ovirt_host_storage_info <ovirt_host_storage_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_network_facts`` module was renamed to :ref:`ovirt_network_info <ovirt_network_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_nic_facts`` module was renamed to :ref:`ovirt_nic_info <ovirt_nic_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_permission_facts`` module was renamed to :ref:`ovirt_permission_info <ovirt_permission_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_quota_facts`` module was renamed to :ref:`ovirt_quota_info <ovirt_quota_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_scheduling_policy_facts`` module was renamed to :ref:`ovirt_scheduling_policy_info <ovirt_scheduling_policy_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_snapshot_facts`` module was renamed to :ref:`ovirt_snapshot_info <ovirt_snapshot_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_storage_domain_facts`` module was renamed to :ref:`ovirt_storage_domain_info <ovirt_storage_domain_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_storage_template_facts`` module was renamed to :ref:`ovirt_storage_template_info <ovirt_storage_template_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_storage_vm_facts`` module was renamed to :ref:`ovirt_storage_vm_info <ovirt_storage_vm_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_tag_facts`` module was renamed to :ref:`ovirt_tag_info <ovirt_tag_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_template_facts`` module was renamed to :ref:`ovirt_template_info <ovirt_template_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_user_facts`` module was renamed to :ref:`ovirt_user_info <ovirt_user_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_vm_facts`` module was renamed to :ref:`ovirt_vm_info <ovirt_vm_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
|
* The ``ovirt_vmpool_facts`` module was renamed to :ref:`ovirt_vmpool_info <ovirt_vmpool_info_module>`.
|
||||||
|
When called with the new name, the module no longer returns ``ansible_facts``.
|
||||||
|
To access return values, :ref:`register a variable <registered_variables>`.
|
||||||
* The ``python_requirements_facts`` module was renamed to :ref:`python_requirements_info <python_requirements_info_module>`.
|
* The ``python_requirements_facts`` module was renamed to :ref:`python_requirements_info <python_requirements_info_module>`.
|
||||||
* The ``rds_instance_facts`` module was renamed to :ref:`rds_instance_info <rds_instance_info_module>`.
|
* The ``rds_instance_facts`` module was renamed to :ref:`rds_instance_info <rds_instance_info_module>`.
|
||||||
* The ``rds_snapshot_facts`` module was renamed to :ref:`rds_snapshot_info <rds_snapshot_info_module>`.
|
* The ``rds_snapshot_facts`` module was renamed to :ref:`rds_snapshot_info <rds_snapshot_info_module>`.
|
||||||
|
|
|
@ -391,10 +391,10 @@ def __get_auth_dict():
|
||||||
return auth
|
return auth
|
||||||
|
|
||||||
|
|
||||||
def ovirt_facts_full_argument_spec(**kwargs):
|
def ovirt_info_full_argument_spec(**kwargs):
|
||||||
"""
|
"""
|
||||||
Extend parameters of facts module with parameters which are common to all
|
Extend parameters of info module with parameters which are common to all
|
||||||
oVirt facts modules.
|
oVirt info modules.
|
||||||
|
|
||||||
:param kwargs: kwargs to be extended
|
:param kwargs: kwargs to be extended
|
||||||
:return: extended dictionary with common parameters
|
:return: extended dictionary with common parameters
|
||||||
|
@ -408,6 +408,17 @@ def ovirt_facts_full_argument_spec(**kwargs):
|
||||||
return spec
|
return spec
|
||||||
|
|
||||||
|
|
||||||
|
# Left for third-party module compatibility
|
||||||
|
def ovirt_facts_full_argument_spec(**kwargs):
|
||||||
|
"""
|
||||||
|
This is deprecated. Please use ovirt_info_full_argument_spec instead!
|
||||||
|
|
||||||
|
:param kwargs: kwargs to be extended
|
||||||
|
:return: extended dictionary with common parameters
|
||||||
|
"""
|
||||||
|
return ovirt_info_full_argument_spec(**kwargs)
|
||||||
|
|
||||||
|
|
||||||
def ovirt_full_argument_spec(**kwargs):
|
def ovirt_full_argument_spec(**kwargs):
|
||||||
"""
|
"""
|
||||||
Extend parameters of module with parameters which are common to all oVirt modules.
|
Extend parameters of module with parameters which are common to all oVirt modules.
|
||||||
|
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_affinity_label_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_affinity_label_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_affinity_label_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_api_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_api_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_api_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_cluster_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_cluster_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_cluster_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_datacenter_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_datacenter_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_datacenter_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_disk_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_disk_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_disk_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_event_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_event_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_event_info.py
|
|
@ -0,0 +1 @@
|
||||||
|
ovirt_external_provider_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_group_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_group_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_group_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_host_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_host_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_host_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_host_storage_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_host_storage_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_host_storage_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_network_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_network_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_network_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_nic_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_nic_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_nic_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_permission_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_permission_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_permission_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_quota_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_quota_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_quota_info.py
|
|
@ -0,0 +1 @@
|
||||||
|
ovirt_scheduling_policy_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_snapshot_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_snapshot_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_snapshot_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_storage_domain_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_storage_domain_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_storage_domain_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_storage_template_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_storage_template_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_storage_template_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_storage_vm_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_storage_vm_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_storage_vm_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_tag_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_tag_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_tag_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_template_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_template_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_template_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_user_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_user_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_user_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_vm_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_vm_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_vm_info.py
|
1
lib/ansible/modules/cloud/ovirt/_ovirt_vmpool_facts.py
Symbolic link
1
lib/ansible/modules/cloud/ovirt/_ovirt_vmpool_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_vmpool_info.py
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_affinity_label_facts
|
module: ovirt_affinity_label_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV affinity labels
|
short_description: Retrieve information about one or more oVirt/RHV affinity labels
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV affinity labels."
|
- "Retrieve information about one or more oVirt/RHV affinity labels."
|
||||||
|
- This module was called C(ovirt_affinity_label_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_affinity_label_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_affinity_labels) fact, which
|
- "This module returns a variable C(ovirt_affinity_labels), which
|
||||||
contains a list of affinity labels."
|
contains a list of affinity labels. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
|
@ -45,40 +48,44 @@ options:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- "Name of the host, which affinity labels should be listed."
|
- "Name of the host, which affinity labels should be listed."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all affinity labels, which names start with C(label):
|
# Gather information about all affinity labels, which names start with C(label):
|
||||||
- ovirt_affinity_label_facts:
|
- ovirt_affinity_label_info:
|
||||||
name: label*
|
name: label*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: affinity_labels
|
msg: "{{ result.ovirt_affinity_labels }}"
|
||||||
|
|
||||||
# Gather facts about all affinity labels, which are assigned to VMs
|
# Gather information about all affinity labels, which are assigned to VMs
|
||||||
# which names start with C(postgres):
|
# which names start with C(postgres):
|
||||||
- ovirt_affinity_label_facts:
|
- ovirt_affinity_label_info:
|
||||||
vm: postgres*
|
vm: postgres*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: affinity_labels
|
msg: "{{ result.ovirt_affinity_labels }}"
|
||||||
|
|
||||||
# Gather facts about all affinity labels, which are assigned to hosts
|
# Gather information about all affinity labels, which are assigned to hosts
|
||||||
# which names start with C(west):
|
# which names start with C(west):
|
||||||
- ovirt_affinity_label_facts:
|
- ovirt_affinity_label_info:
|
||||||
host: west*
|
host: west*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: affinity_labels
|
msg: "{{ result.ovirt_affinity_labels }}"
|
||||||
|
|
||||||
# Gather facts about all affinity labels, which are assigned to hosts
|
# Gather information about all affinity labels, which are assigned to hosts
|
||||||
# which names start with C(west) or VMs which names start with C(postgres):
|
# which names start with C(west) or VMs which names start with C(postgres):
|
||||||
- ovirt_affinity_label_facts:
|
- ovirt_affinity_label_info:
|
||||||
host: west*
|
host: west*
|
||||||
vm: postgres*
|
vm: postgres*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: affinity_labels
|
msg: "{{ result.ovirt_affinity_labels }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -97,18 +104,22 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
search_by_name,
|
search_by_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
host=dict(default=None),
|
host=dict(default=None),
|
||||||
vm=dict(default=None),
|
vm=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_affinity_label_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_affinity_label_facts' module has been renamed to 'ovirt_affinity_label_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -147,19 +158,20 @@ def main():
|
||||||
if not (module.params['vm'] or module.params['host'] or module.params['name']):
|
if not (module.params['vm'] or module.params['host'] or module.params['name']):
|
||||||
labels = all_labels
|
labels = all_labels
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_affinity_labels=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_affinity_labels=[
|
struct=l,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=l,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for l in labels
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for l in labels
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -16,26 +16,30 @@ ANSIBLE_METADATA = {
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_api_facts
|
module: ovirt_api_info
|
||||||
short_description: Retrieve facts about the oVirt/RHV API
|
short_description: Retrieve information about the oVirt/RHV API
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about the oVirt/RHV API."
|
- "Retrieve information about the oVirt/RHV API."
|
||||||
|
- This module was called C(ovirt_api_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_api_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_api) fact,
|
- "This module returns a variable C(ovirt_api),
|
||||||
which contains a information about oVirt/RHV API."
|
which contains a information about oVirt/RHV API. You need to register the result with
|
||||||
extends_documentation_fragment: ovirt_facts
|
the I(register) keyword to use it."
|
||||||
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts oVirt API:
|
# Gather information oVirt API:
|
||||||
- ovirt_api_facts:
|
- ovirt_api_info:
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_api
|
msg: "{{ result.ovirt_api }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -55,30 +59,35 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec()
|
argument_spec = ovirt_info_full_argument_spec()
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_api_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_api_facts' module has been renamed to 'ovirt_api_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
auth = module.params.pop('auth')
|
auth = module.params.pop('auth')
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
api = connection.system_service().get()
|
api = connection.system_service().get()
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_api=get_dict_of_struct(
|
||||||
ansible_facts=dict(
|
struct=api,
|
||||||
ovirt_api=get_dict_of_struct(
|
connection=connection,
|
||||||
struct=api,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
)
|
||||||
attributes=module.params.get('nested_attributes'),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,34 +26,38 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_cluster_facts
|
module: ovirt_cluster_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV clusters
|
short_description: Retrieve information about one or more oVirt/RHV clusters
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV clusters."
|
- "Retrieve information about one or more oVirt/RHV clusters."
|
||||||
|
- This module was called C(ovirt_cluster_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_cluster_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_clusters) fact, which
|
- "This module returns a variable C(ovirt_clusters), which
|
||||||
contains a list of clusters."
|
contains a list of clusters. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search cluster X from datacenter Y use following pattern:
|
- "For example to search cluster X from datacenter Y use following pattern:
|
||||||
name=X and datacenter=Y"
|
name=X and datacenter=Y"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all clusters which names start with C<production>:
|
# Gather information about all clusters which names start with C<production>:
|
||||||
- ovirt_cluster_facts:
|
- ovirt_cluster_info:
|
||||||
pattern:
|
pattern:
|
||||||
name: 'production*'
|
name: 'production*'
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_clusters
|
msg: "{{ result.ovirt_clusters }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_cluster_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_cluster_facts' module has been renamed to 'ovirt_cluster_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -88,19 +96,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
clusters_service = connection.system_service().clusters_service()
|
clusters_service = connection.system_service().clusters_service()
|
||||||
clusters = clusters_service.list(search=module.params['pattern'])
|
clusters = clusters_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_clusters=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_clusters=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in clusters
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in clusters
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -11,32 +11,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_datacenter_facts
|
module: ovirt_datacenter_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV datacenters
|
short_description: Retrieve information about one or more oVirt/RHV datacenters
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV datacenters."
|
- "Retrieve information about one or more oVirt/RHV datacenters."
|
||||||
|
- This module was called C(ovirt_datacenter_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_datacenter_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_datacenters) fact, which
|
- "This module returns a variable C(ovirt_datacenters), which
|
||||||
contains a list of datacenters."
|
contains a list of datacenters. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search datacenter I(X) use following pattern: I(name=X)"
|
- "For example to search datacenter I(X) use following pattern: I(name=X)"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all data centers which names start with C(production):
|
# Gather information about all data centers which names start with C(production):
|
||||||
- ovirt_datacenter_facts:
|
- ovirt_datacenter_info:
|
||||||
pattern: name=production*
|
pattern: name=production*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_datacenters
|
msg: "{{ result.ovirt_datacenters }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -54,15 +58,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_datacenter_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_datacenter_facts' module has been renamed to 'ovirt_datacenter_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -71,19 +79,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
datacenters_service = connection.system_service().data_centers_service()
|
datacenters_service = connection.system_service().data_centers_service()
|
||||||
datacenters = datacenters_service.list(search=module.params['pattern'])
|
datacenters = datacenters_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_datacenters=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_datacenters=[
|
struct=d,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=d,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for d in datacenters
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for d in datacenters
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,33 +26,37 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_disk_facts
|
module: ovirt_disk_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV disks
|
short_description: Retrieve information about one or more oVirt/RHV disks
|
||||||
author: "Katerina Koukiou (@KKoukiou)"
|
author: "Katerina Koukiou (@KKoukiou)"
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV disks."
|
- "Retrieve information about one or more oVirt/RHV disks."
|
||||||
|
- This module was called C(ovirt_disk_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_disk_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_disks) fact, which
|
- "This module returns a variable C(ovirt_disks), which
|
||||||
contains a list of disks."
|
contains a list of disks. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search Disk X from storage Y use following pattern:
|
- "For example to search Disk X from storage Y use following pattern:
|
||||||
name=X and storage.name=Y"
|
name=X and storage.name=Y"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all Disks which names start with C(centos)
|
# Gather information about all Disks which names start with C(centos)
|
||||||
- ovirt_disk_facts:
|
- ovirt_disk_info:
|
||||||
pattern: name=centos*
|
pattern: name=centos*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_disks
|
msg: "{{ result.ovirt_disks }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -70,15 +74,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_disk_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_disk_facts' module has been renamed to 'ovirt_disk_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -88,19 +96,20 @@ def main():
|
||||||
disks = disks_service.list(
|
disks = disks_service.list(
|
||||||
search=module.params['pattern'],
|
search=module.params['pattern'],
|
||||||
)
|
)
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_disks=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_disks=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in disks
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in disks
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -13,12 +13,14 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_event_facts
|
module: ovirt_event_info
|
||||||
short_description: This module can be used to retrieve facts about one or more oVirt/RHV events
|
short_description: This module can be used to retrieve information about one or more oVirt/RHV events
|
||||||
author: "Chris Keller (@nasx)"
|
author: "Chris Keller (@nasx)"
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV events."
|
- "Retrieve information about one or more oVirt/RHV events."
|
||||||
|
- This module was called C(ovirt_event_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_event_info) module no longer returns C(ansible_facts)!
|
||||||
options:
|
options:
|
||||||
case_sensitive:
|
case_sensitive:
|
||||||
description:
|
description:
|
||||||
|
@ -68,7 +70,7 @@ options:
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: bool
|
type: bool
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -76,19 +78,24 @@ EXAMPLES = '''
|
||||||
# look at the ovirt_auth module to see how to reuse authentication.
|
# look at the ovirt_auth module to see how to reuse authentication.
|
||||||
|
|
||||||
- name: Return all events
|
- name: Return all events
|
||||||
ovirt_event_facts:
|
ovirt_event_info:
|
||||||
|
register: result
|
||||||
|
|
||||||
- name: Return the last 10 events
|
- name: Return the last 10 events
|
||||||
ovirt_event_facts:
|
ovirt_event_info:
|
||||||
max: 10
|
max: 10
|
||||||
|
register: result
|
||||||
|
|
||||||
- name: Return all events of type alert
|
- name: Return all events of type alert
|
||||||
ovirt_event_facts:
|
ovirt_event_info:
|
||||||
search: "severity=alert"
|
search: "severity=alert"
|
||||||
|
register: result
|
||||||
|
- debug:
|
||||||
|
msg: "{{ result.ovirt_events }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
ovirt_facts:
|
ovirt_events:
|
||||||
description: "List of dictionaries describing the events. Event attributes are mapped to dictionary keys.
|
description: "List of dictionaries describing the events. Event attributes are mapped to dictionary keys.
|
||||||
All event attributes can be found at the following url:
|
All event attributes can be found at the following url:
|
||||||
http://ovirt.github.io/ovirt-engine-api-model/master/#types/event"
|
http://ovirt.github.io/ovirt-engine-api-model/master/#types/event"
|
||||||
|
@ -103,12 +110,12 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
case_sensitive=dict(default=True, type='bool', required=False),
|
case_sensitive=dict(default=True, type='bool', required=False),
|
||||||
from_=dict(default=None, type='int', required=False),
|
from_=dict(default=None, type='int', required=False),
|
||||||
max=dict(default=None, type='int', required=False),
|
max=dict(default=None, type='int', required=False),
|
||||||
|
@ -118,6 +125,10 @@ def main():
|
||||||
wait=dict(default=True, type='bool', required=False)
|
wait=dict(default=True, type='bool', required=False)
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_event_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_event_facts' module has been renamed to 'ovirt_event_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -135,19 +146,20 @@ def main():
|
||||||
wait=module.params['wait']
|
wait=module.params['wait']
|
||||||
)
|
)
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_events=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_events=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in events
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in events
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_external_provider_facts
|
module: ovirt_external_provider_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV external providers
|
short_description: Retrieve information about one or more oVirt/RHV external providers
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV external providers."
|
- "Retrieve information about one or more oVirt/RHV external providers."
|
||||||
|
- This module was called C(ovirt_external_provider_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_external_provider_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_external_providers) fact, which
|
- "This module returns a variable C(ovirt_external_providers), which
|
||||||
contains a list of external_providers."
|
contains a list of external_providers. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
type:
|
type:
|
||||||
description:
|
description:
|
||||||
|
@ -44,41 +47,35 @@ options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- "Name of the external provider, can be used as glob expression."
|
- "Name of the external provider, can be used as glob expression."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all image external providers named C<glance>:
|
# Gather information about all image external providers named C<glance>:
|
||||||
- ovirt_external_provider_facts:
|
- ovirt_external_provider_info:
|
||||||
type: os_image
|
type: os_image
|
||||||
name: glance
|
name: glance
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_external_providers
|
msg: "{{ result.ovirt_external_providers }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
external_host_providers:
|
ovirt_external_providers:
|
||||||
description: "List of dictionaries of all the external_host_provider attributes. External provider attributes can be found on your oVirt/RHV instance
|
description:
|
||||||
at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/external_host_provider."
|
- "List of dictionaries. Content depends on I(type)."
|
||||||
returned: "On success and if parameter 'type: foreman' is used."
|
- "For type C(foreman), attributes appearing in the dictionary can be found on your oVirt/RHV instance
|
||||||
type: list
|
at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/external_host_provider."
|
||||||
openstack_image_providers:
|
- "For type C(os_image), attributes appearing in the dictionary can be found on your oVirt/RHV instance
|
||||||
description: "List of dictionaries of all the openstack_image_provider attributes. External provider attributes can be found on your oVirt/RHV instance
|
at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_image_provider."
|
||||||
at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_image_provider."
|
- "For type C(os_volume), attributes appearing in the dictionary can be found on your oVirt/RHV instance
|
||||||
returned: "On success and if parameter 'type: os_image' is used."
|
at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_volume_provider."
|
||||||
type: list
|
- "For type C(os_network), attributes appearing in the dictionary can be found on your oVirt/RHV instance
|
||||||
openstack_volume_providers:
|
at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_network_provider."
|
||||||
description: "List of dictionaries of all the openstack_volume_provider attributes. External provider attributes can be found on your oVirt/RHV instance
|
returned: On success
|
||||||
at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_volume_provider."
|
|
||||||
returned: "On success and if parameter 'type: os_volume' is used."
|
|
||||||
type: list
|
|
||||||
openstack_network_providers:
|
|
||||||
description: "List of dictionaries of all the openstack_network_provider attributes. External provider attributes can be found on your oVirt/RHV instance
|
|
||||||
at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_network_provider."
|
|
||||||
returned: "On success and if parameter 'type: os_network' is used."
|
|
||||||
type: list
|
type: list
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -90,7 +87,7 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +103,7 @@ def _external_provider_service(provider_type, system_service):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
name=dict(default=None, required=False),
|
name=dict(default=None, required=False),
|
||||||
type=dict(
|
type=dict(
|
||||||
default=None,
|
default=None,
|
||||||
|
@ -118,6 +115,10 @@ def main():
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_external_provider_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_external_provider_facts' module has been renamed to 'ovirt_external_provider_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -136,19 +137,20 @@ def main():
|
||||||
else:
|
else:
|
||||||
external_providers = external_providers_service.list()
|
external_providers = external_providers_service.list()
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_external_providers=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_external_providers=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in external_providers
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in external_providers
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,32 +26,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_group_facts
|
module: ovirt_group_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV groups
|
short_description: Retrieve information about one or more oVirt/RHV groups
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV groups."
|
- "Retrieve information about one or more oVirt/RHV groups."
|
||||||
|
- This module was called C(ovirt_group_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_group_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_groups) fact, which
|
- "This module returns a variable C(ovirt_groups), which
|
||||||
contains a list of groups."
|
contains a list of groups. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search group X use following pattern: name=X"
|
- "For example to search group X use following pattern: name=X"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all groups which names start with C(admin):
|
# Gather information about all groups which names start with C(admin):
|
||||||
- ovirt_group_facts:
|
- ovirt_group_info:
|
||||||
pattern: name=admin*
|
pattern: name=admin*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_groups
|
msg: "{{ result.ovirt_groups }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -69,15 +73,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_group_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_group_facts' module has been renamed to 'ovirt_group_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -86,19 +94,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
groups_service = connection.system_service().groups_service()
|
groups_service = connection.system_service().groups_service()
|
||||||
groups = groups_service.list(search=module.params['pattern'])
|
groups = groups_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_groups=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_groups=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in groups
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in groups
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -11,15 +11,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_host_facts
|
module: ovirt_host_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV hosts
|
short_description: Retrieve information about one or more oVirt/RHV hosts
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV hosts."
|
- "Retrieve information about one or more oVirt/RHV hosts."
|
||||||
|
- This module was called C(ovirt_host_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_host_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_hosts) fact, which
|
- "This module returns a variable C(ovirt_hosts), which
|
||||||
contains a list of hosts."
|
contains a list of hosts. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
|
@ -39,25 +42,27 @@ options:
|
||||||
type: str
|
type: str
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
|
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all hosts which names start with C(host) and
|
# Gather information about all hosts which names start with C(host) and
|
||||||
# belong to data center C(west):
|
# belong to data center C(west):
|
||||||
- ovirt_host_facts:
|
- ovirt_host_info:
|
||||||
pattern: name=host* and datacenter=west
|
pattern: name=host* and datacenter=west
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_hosts
|
msg: "{{ result.ovirt_hosts }}"
|
||||||
# All hosts with cluster version 4.2:
|
# All hosts with cluster version 4.2:
|
||||||
- ovirt_host_facts:
|
- ovirt_host_info:
|
||||||
pattern: name=host*
|
pattern: name=host*
|
||||||
cluster_version: "4.2"
|
cluster_version: "4.2"
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_hosts
|
msg: "{{ result.ovirt_hosts }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -75,7 +80,7 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,12 +96,16 @@ def get_filtered_hosts(cluster_version, hosts, connection):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
all_content=dict(default=False, type='bool'),
|
all_content=dict(default=False, type='bool'),
|
||||||
cluster_version=dict(default=None, type='str'),
|
cluster_version=dict(default=None, type='str'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_host_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -111,19 +120,20 @@ def main():
|
||||||
cluster_version = module.params.get('cluster_version')
|
cluster_version = module.params.get('cluster_version')
|
||||||
if cluster_version is not None:
|
if cluster_version is not None:
|
||||||
hosts = get_filtered_hosts(cluster_version, hosts, connection)
|
hosts = get_filtered_hosts(cluster_version, hosts, connection)
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_hosts=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_hosts=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in hosts
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in hosts
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -10,12 +10,14 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_host_storage_facts
|
module: ovirt_host_storage_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV HostStorages (applicable only for block storage)
|
short_description: Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)
|
||||||
author: "Daniel Erez (@derez)"
|
author: "Daniel Erez (@derez)"
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV HostStorages (applicable only for block storage)."
|
- "Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)."
|
||||||
|
- This module was called C(ovirt_host_storage_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_host_storage_info) module no longer returns C(ansible_facts)!
|
||||||
options:
|
options:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
|
@ -34,21 +36,22 @@ options:
|
||||||
- "C(address) - Address of the fibre channel storage server."
|
- "C(address) - Address of the fibre channel storage server."
|
||||||
- "C(port) - Port of the fibre channel storage server."
|
- "C(port) - Port of the fibre channel storage server."
|
||||||
- "C(lun_id) - LUN id."
|
- "C(lun_id) - LUN id."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about HostStorages with specified target and address:
|
# Gather information about HostStorages with specified target and address:
|
||||||
- ovirt_host_storage_facts:
|
- ovirt_host_storage_info:
|
||||||
host: myhost
|
host: myhost
|
||||||
iscsi:
|
iscsi:
|
||||||
target: iqn.2016-08-09.domain-01:nickname
|
target: iqn.2016-08-09.domain-01:nickname
|
||||||
address: 10.34.63.204
|
address: 10.34.63.204
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_host_storages
|
msg: "{{ result.ovirt_host_storages }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -71,7 +74,7 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
get_id_by_name,
|
get_id_by_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -94,12 +97,16 @@ def _get_storage_type(params):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
host=dict(required=True),
|
host=dict(required=True),
|
||||||
iscsi=dict(default=None, type='dict'),
|
iscsi=dict(default=None, type='dict'),
|
||||||
fcp=dict(default=None, type='dict'),
|
fcp=dict(default=None, type='dict'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_host_storage_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_host_storage_facts' module has been renamed to 'ovirt_host_storage_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -130,19 +137,20 @@ def main():
|
||||||
filterred_host_storages = [host_storage for host_storage in host_storages
|
filterred_host_storages = [host_storage for host_storage in host_storages
|
||||||
if host_storage.type == otypes.StorageType.FCP]
|
if host_storage.type == otypes.StorageType.FCP]
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_host_storages=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_host_storages=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in filterred_host_storages
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in filterred_host_storages
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,21 +26,24 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_network_facts
|
module: ovirt_network_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV networks
|
short_description: Retrieve information about one or more oVirt/RHV networks
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV networks."
|
- "Retrieve information about one or more oVirt/RHV networks."
|
||||||
|
- This module was called C(ovirt_network_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_network_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_networks) fact, which
|
- "This module returns a variable C(ovirt_networks), which
|
||||||
contains a list of networks."
|
contains a list of networks. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search network starting with string vlan1 use: name=vlan1*"
|
- "For example to search network starting with string vlan1 use: name=vlan1*"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,11 +51,12 @@ EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all networks which names start with C(vlan1):
|
# Gather information about all networks which names start with C(vlan1):
|
||||||
- ovirt_network_facts:
|
- ovirt_network_info:
|
||||||
pattern: name=vlan1*
|
pattern: name=vlan1*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_networks
|
msg: "{{ result.ovirt_networks }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_network_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_network_facts' module has been renamed to 'ovirt_network_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -88,19 +96,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
networks_service = connection.system_service().networks_service()
|
networks_service = connection.system_service().networks_service()
|
||||||
networks = networks_service.list(search=module.params['pattern'])
|
networks = networks_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_networks=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_networks=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in networks
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in networks
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_nic_facts
|
module: ovirt_nic_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV virtual machine network interfaces
|
short_description: Retrieve information about one or more oVirt/RHV virtual machine network interfaces
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV virtual machine network interfaces."
|
- "Retrieve information about one or more oVirt/RHV virtual machine network interfaces."
|
||||||
|
- This module was called C(ovirt_nic_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_nic_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_nics) fact, which
|
- "This module returns a variable C(ovirt_nics), which
|
||||||
contains a list of NICs."
|
contains a list of NICs. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
vm:
|
vm:
|
||||||
description:
|
description:
|
||||||
|
@ -43,19 +46,20 @@ options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- "Name of the NIC, can be used as glob expression."
|
- "Name of the NIC, can be used as glob expression."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all NICs which names start with C(eth) for VM named C(centos7):
|
# Gather information about all NICs which names start with C(eth) for VM named C(centos7):
|
||||||
- ovirt_nic_facts:
|
- ovirt_nic_info:
|
||||||
vm: centos7
|
vm: centos7
|
||||||
name: eth*
|
name: eth*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_nics
|
msg: "{{ result.ovirt_nics }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -74,17 +78,21 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
search_by_name,
|
search_by_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
vm=dict(required=True),
|
vm=dict(required=True),
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_nic_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_nic_facts' module has been renamed to 'ovirt_nic_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -106,19 +114,20 @@ def main():
|
||||||
else:
|
else:
|
||||||
nics = nics_service.list()
|
nics = nics_service.list()
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_nics=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_nics=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in nics
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in nics
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_permission_facts
|
module: ovirt_permission_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV permissions
|
short_description: Retrieve information about one or more oVirt/RHV permissions
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV permissions."
|
- "Retrieve information about one or more oVirt/RHV permissions."
|
||||||
|
- This module was called C(ovirt_permission_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_permission_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_permissions) fact, which
|
- "This module returns a variable C(ovirt_permissions), which
|
||||||
contains a list of permissions."
|
contains a list of permissions. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
user_name:
|
user_name:
|
||||||
description:
|
description:
|
||||||
|
@ -51,19 +54,20 @@ options:
|
||||||
description:
|
description:
|
||||||
- "Namespace of the authorization provider, where user/group resides."
|
- "Namespace of the authorization provider, where user/group resides."
|
||||||
required: false
|
required: false
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all permissions of user with username C(john):
|
# Gather information about all permissions of user with username C(john):
|
||||||
- ovirt_permission_facts:
|
- ovirt_permission_info:
|
||||||
user_name: john
|
user_name: john
|
||||||
authz_name: example.com-authz
|
authz_name: example.com-authz
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_permissions
|
msg: "{{ result.ovirt_permissions }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -86,7 +90,7 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_link_name,
|
get_link_name,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
search_by_name,
|
search_by_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -115,13 +119,17 @@ def _permissions_service(connection, module):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
authz_name=dict(required=True, aliases=['domain']),
|
authz_name=dict(required=True, aliases=['domain']),
|
||||||
user_name=dict(rdefault=None),
|
user_name=dict(rdefault=None),
|
||||||
group_name=dict(default=None),
|
group_name=dict(default=None),
|
||||||
namespace=dict(default=None),
|
namespace=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_permission_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_permission_facts' module has been renamed to 'ovirt_permission_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -138,10 +146,11 @@ def main():
|
||||||
newperm['%s_id' % key[1:]] = value.id
|
newperm['%s_id' % key[1:]] = value.id
|
||||||
permissions.append(newperm)
|
permissions.append(newperm)
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(ovirt_permissions=permissions)
|
||||||
changed=False,
|
if is_old_facts:
|
||||||
ansible_facts=dict(ovirt_permissions=permissions),
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
)
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_quota_facts
|
module: ovirt_quota_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV quotas
|
short_description: Retrieve information about one or more oVirt/RHV quotas
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
author: "Maor Lipchuk (@machacekondra)"
|
author: "Maor Lipchuk (@machacekondra)"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV quotas."
|
- "Retrieve information about one or more oVirt/RHV quotas."
|
||||||
|
- This module was called C(ovirt_quota_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_quota_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_quotas) fact, which
|
- "This module returns a variable C(ovirt_quotas), which
|
||||||
contains a list of quotas."
|
contains a list of quotas. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
data_center:
|
data_center:
|
||||||
description:
|
description:
|
||||||
|
@ -43,19 +46,20 @@ options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- "Name of the quota, can be used as glob expression."
|
- "Name of the quota, can be used as glob expression."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about quota named C<myquota> in Default datacenter:
|
# Gather information about quota named C<myquota> in Default datacenter:
|
||||||
- ovirt_quota_facts:
|
- ovirt_quota_info:
|
||||||
data_center: Default
|
data_center: Default
|
||||||
name: myquota
|
name: myquota
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_quotas
|
msg: "{{ result.ovirt_quotas }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -74,17 +78,21 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
search_by_name,
|
search_by_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
data_center=dict(required=True),
|
data_center=dict(required=True),
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_quota_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_quota_facts' module has been renamed to 'ovirt_quota_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -106,19 +114,20 @@ def main():
|
||||||
else:
|
else:
|
||||||
quotas = quotas_service.list()
|
quotas = quotas_service.list()
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_quotas=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_quotas=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in quotas
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in quotas
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_scheduling_policy_facts
|
module: ovirt_scheduling_policy_info
|
||||||
short_description: Retrieve facts about one or more oVirt scheduling policies
|
short_description: Retrieve information about one or more oVirt scheduling policies
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt scheduling policies."
|
- "Retrieve information about one or more oVirt scheduling policies."
|
||||||
|
- This module was called C(ovirt_scheduling_policy_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_scheduling_policy_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_scheduling_policies) fact,
|
- "This module returns a variable C(ovirt_scheduling_policies),
|
||||||
which contains a list of scheduling policies."
|
which contains a list of scheduling policies. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
id:
|
id:
|
||||||
description:
|
description:
|
||||||
|
@ -43,18 +46,19 @@ options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- "Name of the scheduling policy, can be used as glob expression."
|
- "Name of the scheduling policy, can be used as glob expression."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all scheduling policies with name InClusterUpgrade:
|
# Gather information about all scheduling policies with name InClusterUpgrade:
|
||||||
- ovirt_scheduling_policy_facts:
|
- ovirt_scheduling_policy_info:
|
||||||
name: InClusterUpgrade
|
name: InClusterUpgrade
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_scheduling_policies
|
msg: "{{ result.ovirt_scheduling_policies }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -75,16 +79,20 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
id=dict(default=None),
|
id=dict(default=None),
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_scheduling_policy_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_scheduling_policy_facts' module has been renamed to 'ovirt_scheduling_policy_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -105,19 +113,20 @@ def main():
|
||||||
else:
|
else:
|
||||||
sched_policies = sched_policies_service.list()
|
sched_policies = sched_policies_service.list()
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_scheduling_policies=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_scheduling_policies=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in sched_policies
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in sched_policies
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -12,15 +12,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_snapshot_facts
|
module: ovirt_snapshot_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV virtual machine snapshots
|
short_description: Retrieve information about one or more oVirt/RHV virtual machine snapshots
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV virtual machine snapshots."
|
- "Retrieve information about one or more oVirt/RHV virtual machine snapshots."
|
||||||
|
- This module was called C(ovirt_snapshot_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_snapshot_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_snapshots) fact, which
|
- "This module returns a variable C(ovirt_snapshots), which
|
||||||
contains a list of snapshots."
|
contains a list of snapshots. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
vm:
|
vm:
|
||||||
description:
|
description:
|
||||||
|
@ -31,20 +34,21 @@ options:
|
||||||
- "Description of the snapshot, can be used as glob expression."
|
- "Description of the snapshot, can be used as glob expression."
|
||||||
snapshot_id:
|
snapshot_id:
|
||||||
description:
|
description:
|
||||||
- "Id of the snapshot we want to retrieve facts about."
|
- "Id of the snapshot we want to retrieve information about."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all snapshots which description start with C(update) for VM named C(centos7):
|
# Gather information about all snapshots which description start with C(update) for VM named C(centos7):
|
||||||
- ovirt_snapshot_facts:
|
- ovirt_snapshot_info:
|
||||||
vm: centos7
|
vm: centos7
|
||||||
description: update*
|
description: update*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_snapshots
|
msg: "{{ result.ovirt_snapshots }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -64,18 +68,22 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
search_by_name,
|
search_by_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
vm=dict(required=True),
|
vm=dict(required=True),
|
||||||
description=dict(default=None),
|
description=dict(default=None),
|
||||||
snapshot_id=dict(default=None),
|
snapshot_id=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_snapshot_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_snapshot_facts' module has been renamed to 'ovirt_snapshot_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -101,19 +109,20 @@ def main():
|
||||||
else:
|
else:
|
||||||
snapshots = snapshots_service.list()
|
snapshots = snapshots_service.list()
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_snapshots=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_snapshots=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in snapshots
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in snapshots
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,34 +26,38 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_storage_domain_facts
|
module: ovirt_storage_domain_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV storage domains
|
short_description: Retrieve information about one or more oVirt/RHV storage domains
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV storage domains."
|
- "Retrieve information about one or more oVirt/RHV storage domains."
|
||||||
|
- This module was called C(ovirt_storage_domain_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_storage_domain_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_storage_domains) fact, which
|
- "This module returns a variable C(ovirt_storage_domains), which
|
||||||
contains a list of storage domains."
|
contains a list of storage domains. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search storage domain X from datacenter Y use following pattern:
|
- "For example to search storage domain X from datacenter Y use following pattern:
|
||||||
name=X and datacenter=Y"
|
name=X and datacenter=Y"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all storage domains which names start with C(data) and
|
# Gather information about all storage domains which names start with C(data) and
|
||||||
# belong to data center C(west):
|
# belong to data center C(west):
|
||||||
- ovirt_storage_domain_facts:
|
- ovirt_storage_domain_info:
|
||||||
pattern: name=data* and datacenter=west
|
pattern: name=data* and datacenter=west
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_storage_domains
|
msg: "{{ result.ovirt_storage_domains }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_storage_domain_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_storage_domain_facts' module has been renamed to 'ovirt_storage_domain_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -88,19 +96,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
storage_domains_service = connection.system_service().storage_domains_service()
|
storage_domains_service = connection.system_service().storage_domains_service()
|
||||||
storage_domains = storage_domains_service.list(search=module.params['pattern'])
|
storage_domains = storage_domains_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_storage_domains=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_storage_domains=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in storage_domains
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in storage_domains
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_storage_template_facts
|
module: ovirt_storage_template_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV templates relate to a storage domain.
|
short_description: Retrieve information about one or more oVirt/RHV templates relate to a storage domain.
|
||||||
author: "Maor Lipchuk (@machacekondra)"
|
author: "Maor Lipchuk (@machacekondra)"
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV templates relate to a storage domain."
|
- "Retrieve information about one or more oVirt/RHV templates relate to a storage domain."
|
||||||
|
- This module was called C(ovirt_storage_template_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_storage_template_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_storage_templates) fact, which
|
- "This module returns a variable C(ovirt_storage_templates), which
|
||||||
contains a list of templates."
|
contains a list of templates. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
unregistered:
|
unregistered:
|
||||||
description:
|
description:
|
||||||
|
@ -48,19 +51,20 @@ options:
|
||||||
storage_domain:
|
storage_domain:
|
||||||
description:
|
description:
|
||||||
- "The storage domain name where the templates should be listed."
|
- "The storage domain name where the templates should be listed."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all Templates which relate to a storage domain and
|
# Gather information about all Templates which relate to a storage domain and
|
||||||
# are unregistered:
|
# are unregistered:
|
||||||
- ovirt_storage_template_facts:
|
- ovirt_storage_template_info:
|
||||||
unregistered=True
|
unregistered=True
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_storage_templates
|
msg: "{{ result.ovirt_storage_templates }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -78,18 +82,22 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
get_id_by_name
|
get_id_by_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
storage_domain=dict(default=None),
|
storage_domain=dict(default=None),
|
||||||
max=dict(default=None, type='int'),
|
max=dict(default=None, type='int'),
|
||||||
unregistered=dict(default=False, type='bool'),
|
unregistered=dict(default=False, type='bool'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_storage_template_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_storage_template_facts' module has been renamed to 'ovirt_storage_template_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -106,19 +114,20 @@ def main():
|
||||||
templates = templates_service.list(unregistered=True)
|
templates = templates_service.list(unregistered=True)
|
||||||
else:
|
else:
|
||||||
templates = templates_service.list(max=module.params['max'])
|
templates = templates_service.list(max=module.params['max'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_storage_templates=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_storage_templates=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in templates
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in templates
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_storage_vm_facts
|
module: ovirt_storage_vm_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV virtual machines relate to a storage domain.
|
short_description: Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain.
|
||||||
author: "Maor Lipchuk (@machacekondra)"
|
author: "Maor Lipchuk (@machacekondra)"
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV virtual machines relate to a storage domain."
|
- "Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain."
|
||||||
|
- This module was called C(ovirt_storage_vm_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_storage_vm_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_storage_vms) fact, which
|
- "This module returns a variable C(ovirt_storage_vms), which
|
||||||
contains a list of virtual machines."
|
contains a list of virtual machines. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
unregistered:
|
unregistered:
|
||||||
description:
|
description:
|
||||||
|
@ -48,19 +51,20 @@ options:
|
||||||
storage_domain:
|
storage_domain:
|
||||||
description:
|
description:
|
||||||
- "The storage domain name where the virtual machines should be listed."
|
- "The storage domain name where the virtual machines should be listed."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all VMs which relate to a storage domain and
|
# Gather information about all VMs which relate to a storage domain and
|
||||||
# are unregistered:
|
# are unregistered:
|
||||||
- ovirt_vms_facts:
|
- ovirt_vms_info:
|
||||||
unregistered=True
|
unregistered=True
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_storage_vms
|
msg: "{{ result.ovirt_storage_vms }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -78,18 +82,22 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
get_id_by_name
|
get_id_by_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
storage_domain=dict(default=None),
|
storage_domain=dict(default=None),
|
||||||
max=dict(default=None, type='int'),
|
max=dict(default=None, type='int'),
|
||||||
unregistered=dict(default=False, type='bool'),
|
unregistered=dict(default=False, type='bool'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_storage_vm_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_storage_vm_facts' module has been renamed to 'ovirt_storage_vm_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -106,19 +114,20 @@ def main():
|
||||||
vms = vms_service.list(unregistered=True)
|
vms = vms_service.list(unregistered=True)
|
||||||
else:
|
else:
|
||||||
vms = vms_service.list()
|
vms = vms_service.list()
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_storage_vms=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_storage_vms=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in vms
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in vms
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_tag_facts
|
module: ovirt_tag_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV tags
|
short_description: Retrieve information about one or more oVirt/RHV tags
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV tags."
|
- "Retrieve information about one or more oVirt/RHV tags."
|
||||||
|
- This module was called C(ovirt_tag_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_tag_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_tags) fact, which
|
- "This module returns a variable C(ovirt_tags), which
|
||||||
contains a list of tags"
|
contains a list of tags. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
|
@ -45,30 +48,33 @@ options:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- "Name of the host, which tags should be listed."
|
- "Name of the host, which tags should be listed."
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all tags, which names start with C(tag):
|
# Gather information about all tags, which names start with C(tag):
|
||||||
- ovirt_tag_facts:
|
- ovirt_tag_info:
|
||||||
name: tag*
|
name: tag*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: tags
|
msg: "{{ result.ovirt_tags }}"
|
||||||
|
|
||||||
# Gather facts about all tags, which are assigned to VM C(postgres):
|
# Gather information about all tags, which are assigned to VM C(postgres):
|
||||||
- ovirt_tag_facts:
|
- ovirt_tag_info:
|
||||||
vm: postgres
|
vm: postgres
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: tags
|
msg: "{{ result.ovirt_tags }}"
|
||||||
|
|
||||||
# Gather facts about all tags, which are assigned to host C(west):
|
# Gather information about all tags, which are assigned to host C(west):
|
||||||
- ovirt_tag_facts:
|
- ovirt_tag_info:
|
||||||
host: west
|
host: west
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: tags
|
msg: "{{ result.ovirt_tags }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -87,18 +93,22 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
search_by_name,
|
search_by_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
host=dict(default=None),
|
host=dict(default=None),
|
||||||
vm=dict(default=None),
|
vm=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_tag_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_tag_facts' module has been renamed to 'ovirt_tag_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -133,19 +143,20 @@ def main():
|
||||||
if not (module.params['vm'] or module.params['host'] or module.params['name']):
|
if not (module.params['vm'] or module.params['host'] or module.params['name']):
|
||||||
tags = all_tags
|
tags = all_tags
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_tags=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_tags=[
|
struct=t,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=t,
|
fetch_nested=module.params['fetch_nested'],
|
||||||
connection=connection,
|
attributes=module.params['nested_attributes'],
|
||||||
fetch_nested=module.params['fetch_nested'],
|
) for t in tags
|
||||||
attributes=module.params['nested_attributes'],
|
],
|
||||||
) for t in tags
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,34 +26,38 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_template_facts
|
module: ovirt_template_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV templates
|
short_description: Retrieve information about one or more oVirt/RHV templates
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV templates."
|
- "Retrieve information about one or more oVirt/RHV templates."
|
||||||
|
- This module was called C(ovirt_template_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_template_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_templates) fact, which
|
- "This module returns a variable C(ovirt_templates), which
|
||||||
contains a list of templates."
|
contains a list of templates. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search template X from datacenter Y use following pattern:
|
- "For example to search template X from datacenter Y use following pattern:
|
||||||
name=X and datacenter=Y"
|
name=X and datacenter=Y"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all templates which names start with C(centos) and
|
# Gather information about all templates which names start with C(centos) and
|
||||||
# belongs to data center C(west):
|
# belongs to data center C(west):
|
||||||
- ovirt_template_facts:
|
- ovirt_template_info:
|
||||||
pattern: name=centos* and datacenter=west
|
pattern: name=centos* and datacenter=west
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_templates
|
msg: "{{ result.ovirt_templates }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_template_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_template_facts' module has been renamed to 'ovirt_template_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -88,19 +96,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
templates_service = connection.system_service().templates_service()
|
templates_service = connection.system_service().templates_service()
|
||||||
templates = templates_service.list(search=module.params['pattern'])
|
templates = templates_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_templates=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_templates=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in templates
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in templates
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,32 +26,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_user_facts
|
module: ovirt_user_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV users
|
short_description: Retrieve information about one or more oVirt/RHV users
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV users."
|
- "Retrieve information about one or more oVirt/RHV users."
|
||||||
|
- This module was called C(ovirt_user_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_user_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_users) fact, which
|
- "This module returns a variable C(ovirt_users), which
|
||||||
contains a list of users."
|
contains a list of users. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search user X use following pattern: name=X"
|
- "For example to search user X use following pattern: name=X"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all users which first names start with C(john):
|
# Gather information about all users which first names start with C(john):
|
||||||
- ovirt_user_facts:
|
- ovirt_user_info:
|
||||||
pattern: name=john*
|
pattern: name=john*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_users
|
msg: "{{ result.ovirt_users }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -69,15 +73,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_user_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_user_facts' module has been renamed to 'ovirt_user_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -86,19 +94,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
users_service = connection.system_service().users_service()
|
users_service = connection.system_service().users_service()
|
||||||
users = users_service.list(search=module.params['pattern'])
|
users = users_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_users=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_users=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in users
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in users
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_vm_facts
|
module: ovirt_vm_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV virtual machines
|
short_description: Retrieve information about one or more oVirt/RHV virtual machines
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV virtual machines."
|
- "Retrieve information about one or more oVirt/RHV virtual machines."
|
||||||
|
- This module was called C(ovirt_vm_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_vm_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_vms) fact, which
|
- "This module returns a variable C(ovirt_vms), which
|
||||||
contains a list of virtual machines."
|
contains a list of virtual machines. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
|
@ -61,26 +64,28 @@ options:
|
||||||
effect when the virtual machine is restarted. By default the value is set by engine."
|
effect when the virtual machine is restarted. By default the value is set by engine."
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all VMs which names start with C(centos) and
|
# Gather information about all VMs which names start with C(centos) and
|
||||||
# belong to cluster C(west):
|
# belong to cluster C(west):
|
||||||
- ovirt_vm_facts:
|
- ovirt_vm_info:
|
||||||
pattern: name=centos* and cluster=west
|
pattern: name=centos* and cluster=west
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_vms
|
msg: "{{ result.ovirt_vms }}"
|
||||||
|
|
||||||
# Gather info about next run configuration of virtual machine named myvm
|
# Gather info about next run configuration of virtual machine named myvm
|
||||||
- ovirt_vm_facts:
|
- ovirt_vm_info:
|
||||||
pattern: name=myvm
|
pattern: name=myvm
|
||||||
next_run: true
|
next_run: true
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_vms[0]
|
msg: "{{ result.ovirt_vms[0] }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -98,12 +103,12 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
all_content=dict(default=False, type='bool'),
|
all_content=dict(default=False, type='bool'),
|
||||||
next_run=dict(default=None, type='bool'),
|
next_run=dict(default=None, type='bool'),
|
||||||
|
@ -111,6 +116,10 @@ def main():
|
||||||
max=dict(default=None, type='int'),
|
max=dict(default=None, type='int'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_vm_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_vm_facts' module has been renamed to 'ovirt_vm_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -127,19 +136,20 @@ def main():
|
||||||
if module.params['next_run']:
|
if module.params['next_run']:
|
||||||
vms = [vms_service.vm_service(vm.id).get(next_run=True) for vm in vms]
|
vms = [vms_service.vm_service(vm.id).get(next_run=True) for vm in vms]
|
||||||
|
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_vms=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_vms=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in vms
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in vms
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -26,32 +26,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ovirt_vmpool_facts
|
module: ovirt_vmpool_info
|
||||||
short_description: Retrieve facts about one or more oVirt/RHV vmpools
|
short_description: Retrieve information about one or more oVirt/RHV vmpools
|
||||||
author: "Ondra Machacek (@machacekondra)"
|
author: "Ondra Machacek (@machacekondra)"
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
description:
|
description:
|
||||||
- "Retrieve facts about one or more oVirt/RHV vmpools."
|
- "Retrieve information about one or more oVirt/RHV vmpools."
|
||||||
|
- This module was called C(ovirt_vmpool_facts) before Ansible 2.9, returning C(ansible_facts).
|
||||||
|
Note that the M(ovirt_vmpool_info) module no longer returns C(ansible_facts)!
|
||||||
notes:
|
notes:
|
||||||
- "This module creates a new top-level C(ovirt_vmpools) fact, which
|
- "This module returns a variable C(ovirt_vmpools), which
|
||||||
contains a list of vmpools."
|
contains a list of vmpools. You need to register the result with
|
||||||
|
the I(register) keyword to use it."
|
||||||
options:
|
options:
|
||||||
pattern:
|
pattern:
|
||||||
description:
|
description:
|
||||||
- "Search term which is accepted by oVirt/RHV search backend."
|
- "Search term which is accepted by oVirt/RHV search backend."
|
||||||
- "For example to search vmpool X: name=X"
|
- "For example to search vmpool X: name=X"
|
||||||
extends_documentation_fragment: ovirt_facts
|
extends_documentation_fragment: ovirt_info
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
# Gather facts about all vm pools which names start with C(centos):
|
# Gather information about all vm pools which names start with C(centos):
|
||||||
- ovirt_vmpool_facts:
|
- ovirt_vmpool_info:
|
||||||
pattern: name=centos*
|
pattern: name=centos*
|
||||||
|
register: result
|
||||||
- debug:
|
- debug:
|
||||||
var: ovirt_vmpools
|
msg: "{{ result.ovirt_vm_pools }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -69,15 +73,19 @@ from ansible.module_utils.ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
create_connection,
|
create_connection,
|
||||||
get_dict_of_struct,
|
get_dict_of_struct,
|
||||||
ovirt_facts_full_argument_spec,
|
ovirt_info_full_argument_spec,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_facts_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
is_old_facts = module._name == 'ovirt_vmpool_facts'
|
||||||
|
if is_old_facts:
|
||||||
|
module.deprecate("The 'ovirt_vmpool_facts' module has been renamed to 'ovirt_vmpool_info', "
|
||||||
|
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||||
|
|
||||||
check_sdk(module)
|
check_sdk(module)
|
||||||
|
|
||||||
|
@ -86,19 +94,20 @@ def main():
|
||||||
connection = create_connection(auth)
|
connection = create_connection(auth)
|
||||||
vmpools_service = connection.system_service().vm_pools_service()
|
vmpools_service = connection.system_service().vm_pools_service()
|
||||||
vmpools = vmpools_service.list(search=module.params['pattern'])
|
vmpools = vmpools_service.list(search=module.params['pattern'])
|
||||||
module.exit_json(
|
result = dict(
|
||||||
changed=False,
|
ovirt_vm_pools=[
|
||||||
ansible_facts=dict(
|
get_dict_of_struct(
|
||||||
ovirt_vm_pools=[
|
struct=c,
|
||||||
get_dict_of_struct(
|
connection=connection,
|
||||||
struct=c,
|
fetch_nested=module.params.get('fetch_nested'),
|
||||||
connection=connection,
|
attributes=module.params.get('nested_attributes'),
|
||||||
fetch_nested=module.params.get('fetch_nested'),
|
) for c in vmpools
|
||||||
attributes=module.params.get('nested_attributes'),
|
],
|
||||||
) for c in vmpools
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
if is_old_facts:
|
||||||
|
module.exit_json(changed=False, ansible_facts=result)
|
||||||
|
else:
|
||||||
|
module.exit_json(changed=False, **result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||||
finally:
|
finally:
|
|
@ -1,56 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright: (c) 2016, Red Hat, Inc.
|
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
|
||||||
|
|
||||||
# facts standard oVirt documentation fragment
|
|
||||||
DOCUMENTATION = r'''
|
|
||||||
options:
|
|
||||||
fetch_nested:
|
|
||||||
description:
|
|
||||||
- If I(yes) the module will fetch additional data from the API.
|
|
||||||
- It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other
|
|
||||||
attributes of the nested entities by specifying C(nested_attributes).
|
|
||||||
type: bool
|
|
||||||
version_added: "2.3"
|
|
||||||
nested_attributes:
|
|
||||||
description:
|
|
||||||
- Specifies list of the attributes which should be fetched from the API.
|
|
||||||
- This parameter apply only when C(fetch_nested) is I(true).
|
|
||||||
type: list
|
|
||||||
version_added: "2.3"
|
|
||||||
auth:
|
|
||||||
description:
|
|
||||||
- "Dictionary with values needed to create HTTP/HTTPS connection to oVirt:"
|
|
||||||
- C(username)[I(required)] - The name of the user, something like I(admin@internal).
|
|
||||||
Default value is set by I(OVIRT_USERNAME) environment variable.
|
|
||||||
- "C(password)[I(required)] - The password of the user. Default value is set by I(OVIRT_PASSWORD) environment variable."
|
|
||||||
- "C(url)- A string containing the API URL of the server, usually
|
|
||||||
something like `I(https://server.example.com/ovirt-engine/api)`. Default value is set by I(OVIRT_URL) environment variable.
|
|
||||||
Either C(url) or C(hostname) is required."
|
|
||||||
- "C(hostname) - A string containing the hostname of the server, usually
|
|
||||||
something like `I(server.example.com)`. Default value is set by I(OVIRT_HOSTNAME) environment variable.
|
|
||||||
Either C(url) or C(hostname) is required."
|
|
||||||
- "C(token) - Token to be used instead of login with username/password. Default value is set by I(OVIRT_TOKEN) environment variable."
|
|
||||||
- "C(insecure) - A boolean flag that indicates if the server TLS
|
|
||||||
certificate and host name should be checked."
|
|
||||||
- "C(ca_file) - A PEM file containing the trusted CA certificates. The
|
|
||||||
certificate presented by the server will be verified using these CA
|
|
||||||
certificates. If `C(ca_file)` parameter is not set, system wide
|
|
||||||
CA certificate store is used. Default value is set by I(OVIRT_CAFILE) environment variable."
|
|
||||||
- "C(kerberos) - A boolean flag indicating if Kerberos authentication
|
|
||||||
should be used instead of the default basic authentication."
|
|
||||||
- "C(headers) - Dictionary of HTTP headers to be added to each API call."
|
|
||||||
type: dict
|
|
||||||
required: true
|
|
||||||
requirements:
|
|
||||||
- python >= 2.7
|
|
||||||
- ovirt-engine-sdk-python >= 4.3.0
|
|
||||||
notes:
|
|
||||||
- "In order to use this module you have to install oVirt Python SDK.
|
|
||||||
To ensure it's installed with correct version you can create the following task:
|
|
||||||
pip: name=ovirt-engine-sdk-python version=4.3.0"
|
|
||||||
'''
|
|
1
lib/ansible/plugins/doc_fragments/ovirt_facts.py
Symbolic link
1
lib/ansible/plugins/doc_fragments/ovirt_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
ovirt_info.py
|
56
lib/ansible/plugins/doc_fragments/ovirt_info.py
Normal file
56
lib/ansible/plugins/doc_fragments/ovirt_info.py
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright: (c) 2016, Red Hat, Inc.
|
||||||
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
|
||||||
|
|
||||||
|
class ModuleDocFragment(object):
|
||||||
|
|
||||||
|
# info standard oVirt documentation fragment
|
||||||
|
DOCUMENTATION = r'''
|
||||||
|
options:
|
||||||
|
fetch_nested:
|
||||||
|
description:
|
||||||
|
- If I(yes) the module will fetch additional data from the API.
|
||||||
|
- It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other
|
||||||
|
attributes of the nested entities by specifying C(nested_attributes).
|
||||||
|
type: bool
|
||||||
|
version_added: "2.3"
|
||||||
|
nested_attributes:
|
||||||
|
description:
|
||||||
|
- Specifies list of the attributes which should be fetched from the API.
|
||||||
|
- This parameter apply only when C(fetch_nested) is I(true).
|
||||||
|
type: list
|
||||||
|
version_added: "2.3"
|
||||||
|
auth:
|
||||||
|
description:
|
||||||
|
- "Dictionary with values needed to create HTTP/HTTPS connection to oVirt:"
|
||||||
|
- C(username)[I(required)] - The name of the user, something like I(admin@internal).
|
||||||
|
Default value is set by I(OVIRT_USERNAME) environment variable.
|
||||||
|
- "C(password)[I(required)] - The password of the user. Default value is set by I(OVIRT_PASSWORD) environment variable."
|
||||||
|
- "C(url)- A string containing the API URL of the server, usually
|
||||||
|
something like `I(https://server.example.com/ovirt-engine/api)`. Default value is set by I(OVIRT_URL) environment variable.
|
||||||
|
Either C(url) or C(hostname) is required."
|
||||||
|
- "C(hostname) - A string containing the hostname of the server, usually
|
||||||
|
something like `I(server.example.com)`. Default value is set by I(OVIRT_HOSTNAME) environment variable.
|
||||||
|
Either C(url) or C(hostname) is required."
|
||||||
|
- "C(token) - Token to be used instead of login with username/password. Default value is set by I(OVIRT_TOKEN) environment variable."
|
||||||
|
- "C(insecure) - A boolean flag that indicates if the server TLS
|
||||||
|
certificate and host name should be checked."
|
||||||
|
- "C(ca_file) - A PEM file containing the trusted CA certificates. The
|
||||||
|
certificate presented by the server will be verified using these CA
|
||||||
|
certificates. If `C(ca_file)` parameter is not set, system wide
|
||||||
|
CA certificate store is used. Default value is set by I(OVIRT_CAFILE) environment variable."
|
||||||
|
- "C(kerberos) - A boolean flag indicating if Kerberos authentication
|
||||||
|
should be used instead of the default basic authentication."
|
||||||
|
- "C(headers) - Dictionary of HTTP headers to be added to each API call."
|
||||||
|
type: dict
|
||||||
|
required: true
|
||||||
|
requirements:
|
||||||
|
- python >= 2.7
|
||||||
|
- ovirt-engine-sdk-python >= 4.3.0
|
||||||
|
notes:
|
||||||
|
- "In order to use this module you have to install oVirt Python SDK.
|
||||||
|
To ensure it's installed with correct version you can create the following task:
|
||||||
|
pip: name=ovirt-engine-sdk-python version=4.3.0"
|
||||||
|
'''
|
|
@ -1719,9 +1719,9 @@ lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py validate-modules:E317
|
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py validate-modules:E317
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_auth.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_auth.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_auth.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_auth.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_auth.py validate-modules:E322
|
lib/ansible/modules/cloud/ovirt/ovirt_auth.py validate-modules:E322
|
||||||
|
@ -1735,16 +1735,16 @@ lib/ansible/modules/cloud/ovirt/ovirt_cluster.py validate-modules:E322
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_cluster.py validate-modules:E326
|
lib/ansible/modules/cloud/ovirt/ovirt_cluster.py validate-modules:E326
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_cluster.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_cluster.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_cluster.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_cluster.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py validate-modules:E317
|
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py validate-modules:E317
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_disk.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_disk.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E322
|
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E322
|
||||||
|
@ -1752,9 +1752,9 @@ lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E324
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E326
|
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E326
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_disk.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E317
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E317
|
||||||
|
@ -1762,25 +1762,25 @@ lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E322
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E324
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E324
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py validate-modules:E317
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py validate-modules:E317
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py validate-modules:E322
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py validate-modules:E322
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_group.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_group.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_group.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_group.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_group.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_group.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_group_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_group_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_group_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host.py validate-modules:E335
|
lib/ansible/modules/cloud/ovirt/ovirt_host.py validate-modules:E335
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_host.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_host.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_host_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_network.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host_network.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_network.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host_network.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_network.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_host_network.py validate-modules:E337
|
||||||
|
@ -1790,10 +1790,10 @@ lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py validate-modules:E317
|
lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py validate-modules:E317
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_instance_type.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_instance_type.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_instance_type.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_instance_type.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_instance_type.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_instance_type.py validate-modules:E337
|
||||||
|
@ -1808,43 +1808,43 @@ lib/ansible/modules/cloud/ovirt/ovirt_network.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_network.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_network.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_network.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_network.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_network.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_network.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_network_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_network_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_network_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_network_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_network_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_network_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_nic.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_nic.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_nic.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_nic.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_nic.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_nic.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_nic.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_nic.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_permission.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_permission.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_permission.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_permission.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_permission.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_permission.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_permission_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_permission_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_permission_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_quota.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_quota.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_quota.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_quota.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_quota.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_quota.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_quota.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_quota.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_role.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_role.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_role.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_role.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_role.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_role.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_role.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_role.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_connection.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_connection.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_connection.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_connection.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_connection.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_connection.py validate-modules:E337
|
||||||
|
@ -1853,52 +1853,52 @@ lib/ansible/modules/cloud/ovirt/ovirt_storage_domain.py future-import-boilerplat
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_tag.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_tag.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_tag.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_tag.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_tag.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_tag.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_tag.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_tag.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_template.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_template.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_template.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_template.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_template.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_template.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_template.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_template.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_template_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_template_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_template_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_user.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_user.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_user.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_user.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_user.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_user.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_user_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_user_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_user_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_user_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_user_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_user_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vm.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vm.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_vm.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_vm.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py validate-modules:E337
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_vmpool.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py validate-modules:E338
|
lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py validate-modules:E338
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py future-import-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py future-import-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py metaclass-boilerplate
|
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py metaclass-boilerplate
|
||||||
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py validate-modules:E337
|
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py validate-modules:E337
|
||||||
|
@ -5914,8 +5914,8 @@ lib/ansible/plugins/doc_fragments/oracle_wait_options.py future-import-boilerpla
|
||||||
lib/ansible/plugins/doc_fragments/oracle_wait_options.py metaclass-boilerplate
|
lib/ansible/plugins/doc_fragments/oracle_wait_options.py metaclass-boilerplate
|
||||||
lib/ansible/plugins/doc_fragments/ovirt.py future-import-boilerplate
|
lib/ansible/plugins/doc_fragments/ovirt.py future-import-boilerplate
|
||||||
lib/ansible/plugins/doc_fragments/ovirt.py metaclass-boilerplate
|
lib/ansible/plugins/doc_fragments/ovirt.py metaclass-boilerplate
|
||||||
lib/ansible/plugins/doc_fragments/ovirt_facts.py future-import-boilerplate
|
lib/ansible/plugins/doc_fragments/ovirt_info.py future-import-boilerplate
|
||||||
lib/ansible/plugins/doc_fragments/ovirt_facts.py metaclass-boilerplate
|
lib/ansible/plugins/doc_fragments/ovirt_info.py metaclass-boilerplate
|
||||||
lib/ansible/plugins/doc_fragments/panos.py future-import-boilerplate
|
lib/ansible/plugins/doc_fragments/panos.py future-import-boilerplate
|
||||||
lib/ansible/plugins/doc_fragments/panos.py metaclass-boilerplate
|
lib/ansible/plugins/doc_fragments/panos.py metaclass-boilerplate
|
||||||
lib/ansible/plugins/doc_fragments/postgres.py future-import-boilerplate
|
lib/ansible/plugins/doc_fragments/postgres.py future-import-boilerplate
|
||||||
|
|
Loading…
Reference in a new issue