diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 67bd3916a7f..4bb226c27b9 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1174,7 +1174,7 @@ files: $plugins/doc_fragments/ucs.py: *ucs $plugins/doc_fragments/vultr.py: *vultr $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: maintainers: bvitnik $plugins/doc_fragments/hpe3par.py: *hpe3par diff --git a/changelogs/fragments/61299-ovirt-facts-info.yml b/changelogs/fragments/61299-ovirt-facts-info.yml new file mode 100644 index 00000000000..281e0966bba --- /dev/null +++ b/changelogs/fragments/61299-ovirt-facts-info.yml @@ -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``. diff --git a/docs/docsite/rst/dev_guide/platforms/ovirt_dev_guide.rst b/docs/docsite/rst/dev_guide/platforms/ovirt_dev_guide.rst index b397eb80766..56df1671436 100644 --- a/docs/docsite/rst/dev_guide/platforms/ovirt_dev_guide.rst +++ b/docs/docsite/rst/dev_guide/platforms/ovirt_dev_guide.rst @@ -15,7 +15,7 @@ Naming - All modules should start with an ``ovirt_`` prefix. - All modules should be named after the resource it manages in singular form. -- All modules that gather facts should have a ``_facts`` +- All modules that gather information should have a ``_info`` suffix. Interface @@ -38,12 +38,12 @@ Libraries --------- - 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``). - All modules should use ``extends_documentation_fragment``: ovirt to go along with ``ovirt_full_argument_spec``. -- All facts modules should use ``extends_documentation_fragment``: - ``ovirt_facts`` to go along with ``ovirt_facts_full_argument_spec``. +- All info modules should use ``extends_documentation_fragment``: + ``ovirt_info`` to go along with ``ovirt_info_full_argument_spec``. - Functions that are common to all modules should be implemeneted in the ``module_utils/ovirt.py`` file, so they can be reused. - Python SDK version 4 must be used. diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst index 4eeef7941ea..09271b8f640 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst @@ -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 `. When called with the new name, the module no longer returns ``ansible_facts``. To access return values, :ref:`register a variable `. +* The ``ovirt_affinity_label_facts`` module was renamed to :ref:`ovirt_affinity_label_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_api_facts`` module was renamed to :ref:`ovirt_api_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_cluster_facts`` module was renamed to :ref:`ovirt_cluster_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_datacenter_facts`` module was renamed to :ref:`ovirt_datacenter_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_disk_facts`` module was renamed to :ref:`ovirt_disk_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_event_facts`` module was renamed to :ref:`ovirt_event_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_external_provider_facts`` module was renamed to :ref:`ovirt_external_provider_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_group_facts`` module was renamed to :ref:`ovirt_group_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_host_facts`` module was renamed to :ref:`ovirt_host_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_host_storage_facts`` module was renamed to :ref:`ovirt_host_storage_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_network_facts`` module was renamed to :ref:`ovirt_network_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_nic_facts`` module was renamed to :ref:`ovirt_nic_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_permission_facts`` module was renamed to :ref:`ovirt_permission_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_quota_facts`` module was renamed to :ref:`ovirt_quota_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_scheduling_policy_facts`` module was renamed to :ref:`ovirt_scheduling_policy_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_snapshot_facts`` module was renamed to :ref:`ovirt_snapshot_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_storage_domain_facts`` module was renamed to :ref:`ovirt_storage_domain_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_storage_template_facts`` module was renamed to :ref:`ovirt_storage_template_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_storage_vm_facts`` module was renamed to :ref:`ovirt_storage_vm_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_tag_facts`` module was renamed to :ref:`ovirt_tag_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_template_facts`` module was renamed to :ref:`ovirt_template_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_user_facts`` module was renamed to :ref:`ovirt_user_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_vm_facts`` module was renamed to :ref:`ovirt_vm_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. +* The ``ovirt_vmpool_facts`` module was renamed to :ref:`ovirt_vmpool_info `. + When called with the new name, the module no longer returns ``ansible_facts``. + To access return values, :ref:`register a variable `. * The ``python_requirements_facts`` module was renamed to :ref:`python_requirements_info `. * The ``rds_instance_facts`` module was renamed to :ref:`rds_instance_info `. * The ``rds_snapshot_facts`` module was renamed to :ref:`rds_snapshot_info `. diff --git a/lib/ansible/module_utils/ovirt.py b/lib/ansible/module_utils/ovirt.py index 4b2b48526c5..6f0f380c668 100644 --- a/lib/ansible/module_utils/ovirt.py +++ b/lib/ansible/module_utils/ovirt.py @@ -391,10 +391,10 @@ def __get_auth_dict(): 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 - oVirt facts modules. + Extend parameters of info module with parameters which are common to all + oVirt info modules. :param kwargs: kwargs to be extended :return: extended dictionary with common parameters @@ -408,6 +408,17 @@ def ovirt_facts_full_argument_spec(**kwargs): 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): """ Extend parameters of module with parameters which are common to all oVirt modules. diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_affinity_label_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_affinity_label_facts.py new file mode 120000 index 00000000000..c38331a7048 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_affinity_label_facts.py @@ -0,0 +1 @@ +ovirt_affinity_label_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_api_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_api_facts.py new file mode 120000 index 00000000000..b72924d825d --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_api_facts.py @@ -0,0 +1 @@ +ovirt_api_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_cluster_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_cluster_facts.py new file mode 120000 index 00000000000..093a0a7e02e --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_cluster_facts.py @@ -0,0 +1 @@ +ovirt_cluster_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_datacenter_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_datacenter_facts.py new file mode 120000 index 00000000000..b6e406137b3 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_datacenter_facts.py @@ -0,0 +1 @@ +ovirt_datacenter_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_disk_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_disk_facts.py new file mode 120000 index 00000000000..6bc0a99eed6 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_disk_facts.py @@ -0,0 +1 @@ +ovirt_disk_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_event_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_event_facts.py new file mode 120000 index 00000000000..6de81605768 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_event_facts.py @@ -0,0 +1 @@ +ovirt_event_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_external_provider_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_external_provider_facts.py new file mode 120000 index 00000000000..623df51c5ce --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_external_provider_facts.py @@ -0,0 +1 @@ +ovirt_external_provider_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_group_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_group_facts.py new file mode 120000 index 00000000000..c7344d59329 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_group_facts.py @@ -0,0 +1 @@ +ovirt_group_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_host_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_host_facts.py new file mode 120000 index 00000000000..461f3cf2a29 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_host_facts.py @@ -0,0 +1 @@ +ovirt_host_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_host_storage_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_host_storage_facts.py new file mode 120000 index 00000000000..07c1cad4235 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_host_storage_facts.py @@ -0,0 +1 @@ +ovirt_host_storage_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_network_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_network_facts.py new file mode 120000 index 00000000000..74a1ac78dd8 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_network_facts.py @@ -0,0 +1 @@ +ovirt_network_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_nic_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_nic_facts.py new file mode 120000 index 00000000000..c62d9d8134d --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_nic_facts.py @@ -0,0 +1 @@ +ovirt_nic_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_permission_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_permission_facts.py new file mode 120000 index 00000000000..678e16e2bbc --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_permission_facts.py @@ -0,0 +1 @@ +ovirt_permission_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_quota_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_quota_facts.py new file mode 120000 index 00000000000..6d1c51a12f7 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_quota_facts.py @@ -0,0 +1 @@ +ovirt_quota_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_scheduling_policy_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_scheduling_policy_facts.py new file mode 120000 index 00000000000..372dbf88cf5 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_scheduling_policy_facts.py @@ -0,0 +1 @@ +ovirt_scheduling_policy_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_snapshot_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_snapshot_facts.py new file mode 120000 index 00000000000..478533ca90a --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_snapshot_facts.py @@ -0,0 +1 @@ +ovirt_snapshot_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_storage_domain_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_storage_domain_facts.py new file mode 120000 index 00000000000..df51949cd96 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_storage_domain_facts.py @@ -0,0 +1 @@ +ovirt_storage_domain_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_storage_template_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_storage_template_facts.py new file mode 120000 index 00000000000..5e456a0cbcb --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_storage_template_facts.py @@ -0,0 +1 @@ +ovirt_storage_template_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_storage_vm_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_storage_vm_facts.py new file mode 120000 index 00000000000..a53fbba4633 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_storage_vm_facts.py @@ -0,0 +1 @@ +ovirt_storage_vm_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_tag_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_tag_facts.py new file mode 120000 index 00000000000..72e8f92d436 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_tag_facts.py @@ -0,0 +1 @@ +ovirt_tag_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_template_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_template_facts.py new file mode 120000 index 00000000000..7ad3353b6c5 --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_template_facts.py @@ -0,0 +1 @@ +ovirt_template_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_user_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_user_facts.py new file mode 120000 index 00000000000..86cdc4e546b --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_user_facts.py @@ -0,0 +1 @@ +ovirt_user_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_vm_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_vm_facts.py new file mode 120000 index 00000000000..537bdbc3ace --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_vm_facts.py @@ -0,0 +1 @@ +ovirt_vm_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/_ovirt_vmpool_facts.py b/lib/ansible/modules/cloud/ovirt/_ovirt_vmpool_facts.py new file mode 120000 index 00000000000..241343a703d --- /dev/null +++ b/lib/ansible/modules/cloud/ovirt/_ovirt_vmpool_facts.py @@ -0,0 +1 @@ +ovirt_vmpool_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py similarity index 65% rename from lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py index 458cb9c57ed..4a9babcfba1 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_affinity_label_facts -short_description: Retrieve facts about one or more oVirt/RHV affinity labels +module: ovirt_affinity_label_info +short_description: Retrieve information about one or more oVirt/RHV affinity labels author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_affinity_labels) fact, which - contains a list of affinity labels." + - "This module returns a variable C(ovirt_affinity_labels), which + contains a list of affinity labels. You need to register the result with + the I(register) keyword to use it." options: name: description: @@ -45,40 +48,44 @@ options: host: description: - "Name of the host, which affinity labels should be listed." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all affinity labels, which names start with C(label): -- ovirt_affinity_label_facts: +# Gather information about all affinity labels, which names start with C(label): +- ovirt_affinity_label_info: name: label* + register: result - 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): -- ovirt_affinity_label_facts: +- ovirt_affinity_label_info: vm: postgres* + register: result - 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): -- ovirt_affinity_label_facts: +- ovirt_affinity_label_info: host: west* + register: result - 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): -- ovirt_affinity_label_facts: +- ovirt_affinity_label_info: host: west* vm: postgres* + register: result - debug: - var: affinity_labels + msg: "{{ result.ovirt_affinity_labels }}" ''' RETURN = ''' @@ -97,18 +104,22 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, search_by_name, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( name=dict(default=None), host=dict(default=None), vm=dict(default=None), ) 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) @@ -147,19 +158,20 @@ def main(): if not (module.params['vm'] or module.params['host'] or module.params['name']): labels = all_labels - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_affinity_labels=[ - get_dict_of_struct( - struct=l, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for l in labels - ], - ), + result = dict( + ovirt_affinity_labels=[ + get_dict_of_struct( + struct=l, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_api_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_api_info.py similarity index 52% rename from lib/ansible/modules/cloud/ovirt/ovirt_api_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_api_info.py index ceed55033d5..e639ea4982f 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_api_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_api_info.py @@ -16,26 +16,30 @@ ANSIBLE_METADATA = { DOCUMENTATION = ''' --- -module: ovirt_api_facts -short_description: Retrieve facts about the oVirt/RHV API +module: ovirt_api_info +short_description: Retrieve information about the oVirt/RHV API author: "Ondra Machacek (@machacekondra)" version_added: "2.5" 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: - - "This module creates a new top-level C(ovirt_api) fact, - which contains a information about oVirt/RHV API." -extends_documentation_fragment: ovirt_facts + - "This module returns a variable C(ovirt_api), + which contains a information about oVirt/RHV API. You need to register the result with + the I(register) keyword to use it." +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts oVirt API: -- ovirt_api_facts: +# Gather information oVirt API: +- ovirt_api_info: + register: result - debug: - var: ovirt_api + msg: "{{ result.ovirt_api }}" ''' RETURN = ''' @@ -55,30 +59,35 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec() + argument_spec = ovirt_info_full_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) try: auth = module.params.pop('auth') connection = create_connection(auth) api = connection.system_service().get() - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_api=get_dict_of_struct( - struct=api, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) - ), + result = dict( + ovirt_api=get_dict_of_struct( + struct=api, + connection=connection, + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py similarity index 61% rename from lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py index c7f5d8cdbab..646c05efd97 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py @@ -26,34 +26,38 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_cluster_facts -short_description: Retrieve facts about one or more oVirt/RHV clusters +module: ovirt_cluster_info +short_description: Retrieve information about one or more oVirt/RHV clusters author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_clusters) fact, which - contains a list of clusters." + - "This module returns a variable C(ovirt_clusters), which + contains a list of clusters. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "For example to search cluster X from datacenter Y use following pattern: name=X and datacenter=Y" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all clusters which names start with C: -- ovirt_cluster_facts: +# Gather information about all clusters which names start with C: +- ovirt_cluster_info: pattern: name: 'production*' + register: result - debug: - var: ovirt_clusters + msg: "{{ result.ovirt_clusters }}" ''' RETURN = ''' @@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -88,19 +96,20 @@ def main(): connection = create_connection(auth) clusters_service = connection.system_service().clusters_service() clusters = clusters_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_clusters=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in clusters - ], - ), + result = dict( + ovirt_clusters=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py similarity index 53% rename from lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py index acbcbd3b7be..9f17e82ed95 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py @@ -11,32 +11,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_datacenter_facts -short_description: Retrieve facts about one or more oVirt/RHV datacenters +module: ovirt_datacenter_info +short_description: Retrieve information about one or more oVirt/RHV datacenters author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_datacenters) fact, which - contains a list of datacenters." + - "This module returns a variable C(ovirt_datacenters), which + contains a list of datacenters. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "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 don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all data centers which names start with C(production): -- ovirt_datacenter_facts: +# Gather information about all data centers which names start with C(production): +- ovirt_datacenter_info: pattern: name=production* + register: result - debug: - var: ovirt_datacenters + msg: "{{ result.ovirt_datacenters }}" ''' RETURN = ''' @@ -54,15 +58,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -71,19 +79,20 @@ def main(): connection = create_connection(auth) datacenters_service = connection.system_service().data_centers_service() datacenters = datacenters_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_datacenters=[ - get_dict_of_struct( - struct=d, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for d in datacenters - ], - ), + result = dict( + ovirt_datacenters=[ + get_dict_of_struct( + struct=d, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py similarity index 61% rename from lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py index 69bf2aac4c5..af3d855160e 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py @@ -26,33 +26,37 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_disk_facts -short_description: Retrieve facts about one or more oVirt/RHV disks +module: ovirt_disk_info +short_description: Retrieve information about one or more oVirt/RHV disks author: "Katerina Koukiou (@KKoukiou)" version_added: "2.5" 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: - - "This module creates a new top-level C(ovirt_disks) fact, which - contains a list of disks." + - "This module returns a variable C(ovirt_disks), which + contains a list of disks. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "For example to search Disk X from storage Y use following pattern: name=X and storage.name=Y" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all Disks which names start with C(centos) -- ovirt_disk_facts: +# Gather information about all Disks which names start with C(centos) +- ovirt_disk_info: pattern: name=centos* + register: result - debug: - var: ovirt_disks + msg: "{{ result.ovirt_disks }}" ''' RETURN = ''' @@ -70,15 +74,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) try: @@ -88,19 +96,20 @@ def main(): disks = disks_service.list( search=module.params['pattern'], ) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_disks=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in disks - ], - ), + result = dict( + ovirt_disks=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_event_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_event_info.py similarity index 73% rename from lib/ansible/modules/cloud/ovirt/ovirt_event_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_event_info.py index 804af532811..6e15fb31d9b 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_event_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_event_info.py @@ -13,12 +13,14 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_event_facts -short_description: This module can be used to retrieve facts about one or more oVirt/RHV events +module: ovirt_event_info +short_description: This module can be used to retrieve information about one or more oVirt/RHV events author: "Chris Keller (@nasx)" version_added: "2.8" 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: case_sensitive: description: @@ -68,7 +70,7 @@ options: required: false default: true type: bool -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' @@ -76,19 +78,24 @@ EXAMPLES = ''' # look at the ovirt_auth module to see how to reuse authentication. - name: Return all events - ovirt_event_facts: + ovirt_event_info: + register: result - name: Return the last 10 events - ovirt_event_facts: + ovirt_event_info: max: 10 + register: result - name: Return all events of type alert - ovirt_event_facts: + ovirt_event_info: search: "severity=alert" + register: result +- debug: + msg: "{{ result.ovirt_events }}" ''' RETURN = ''' -ovirt_facts: +ovirt_events: description: "List of dictionaries describing the events. Event attributes are mapped to dictionary keys. All event attributes can be found at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/event" @@ -103,12 +110,12 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) 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), from_=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) ) 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) @@ -135,19 +146,20 @@ def main(): wait=module.params['wait'] ) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_events=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in events - ], - ), + result = dict( + ovirt_events=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py similarity index 54% rename from lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py index 5ceb5be5eb3..4a23f17e697 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_external_provider_facts -short_description: Retrieve facts about one or more oVirt/RHV external providers +module: ovirt_external_provider_info +short_description: Retrieve information about one or more oVirt/RHV external providers author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_external_providers) fact, which - contains a list of external_providers." + - "This module returns a variable C(ovirt_external_providers), which + contains a list of external_providers. You need to register the result with + the I(register) keyword to use it." options: type: description: @@ -44,41 +47,35 @@ options: name: description: - "Name of the external provider, can be used as glob expression." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all image external providers named C: -- ovirt_external_provider_facts: +# Gather information about all image external providers named C: +- ovirt_external_provider_info: type: os_image name: glance + register: result - debug: - var: ovirt_external_providers + msg: "{{ result.ovirt_external_providers }}" ''' RETURN = ''' -external_host_providers: - description: "List of dictionaries of all the external_host_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/external_host_provider." - returned: "On success and if parameter 'type: foreman' is used." - type: list -openstack_image_providers: - description: "List of dictionaries of all the openstack_image_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_image_provider." - returned: "On success and if parameter 'type: os_image' is used." - type: list -openstack_volume_providers: - description: "List of dictionaries of all the openstack_volume_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_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." +ovirt_external_providers: + description: + - "List of dictionaries. Content depends on I(type)." + - "For type C(foreman), attributes appearing in the dictionary can be found on your oVirt/RHV instance + at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/external_host_provider." + - "For type C(os_image), attributes appearing in the dictionary 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." + - "For type C(os_volume), attributes appearing in the dictionary can be found on your oVirt/RHV instance + at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_volume_provider." + - "For type C(os_network), attributes appearing in the dictionary can be found on your oVirt/RHV instance + at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack_network_provider." + returned: On success type: list ''' @@ -90,7 +87,7 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, 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(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( name=dict(default=None, required=False), type=dict( default=None, @@ -118,6 +115,10 @@ def main(): ), ) 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) @@ -136,19 +137,20 @@ def main(): else: external_providers = external_providers_service.list() - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_external_providers=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in external_providers - ], - ), + result = dict( + ovirt_external_providers=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_group_info.py similarity index 60% rename from lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_group_info.py index 2320a9484e5..b1381372d05 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_group_info.py @@ -26,32 +26,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_group_facts -short_description: Retrieve facts about one or more oVirt/RHV groups +module: ovirt_group_info +short_description: Retrieve information about one or more oVirt/RHV groups author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_groups) fact, which - contains a list of groups." + - "This module returns a variable C(ovirt_groups), which + contains a list of groups. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "For example to search group X use following pattern: name=X" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all groups which names start with C(admin): -- ovirt_group_facts: +# Gather information about all groups which names start with C(admin): +- ovirt_group_info: pattern: name=admin* + register: result - debug: - var: ovirt_groups + msg: "{{ result.ovirt_groups }}" ''' RETURN = ''' @@ -69,15 +73,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -86,19 +94,20 @@ def main(): connection = create_connection(auth) groups_service = connection.system_service().groups_service() groups = groups_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_groups=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in groups - ], - ), + result = dict( + ovirt_groups=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_host_info.py similarity index 66% rename from lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_host_info.py index 474f0cf82b4..807baa20dcb 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host_info.py @@ -11,15 +11,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_host_facts -short_description: Retrieve facts about one or more oVirt/RHV hosts +module: ovirt_host_info +short_description: Retrieve information about one or more oVirt/RHV hosts author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_hosts) fact, which - contains a list of hosts." + - "This module returns a variable C(ovirt_hosts), which + contains a list of hosts. You need to register the result with + the I(register) keyword to use it." options: pattern: description: @@ -39,25 +42,27 @@ options: type: str version_added: "2.8" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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): -- ovirt_host_facts: +- ovirt_host_info: pattern: name=host* and datacenter=west + register: result - debug: - var: ovirt_hosts + msg: "{{ result.ovirt_hosts }}" # All hosts with cluster version 4.2: -- ovirt_host_facts: +- ovirt_host_info: pattern: name=host* cluster_version: "4.2" + register: result - debug: - var: ovirt_hosts + msg: "{{ result.ovirt_hosts }}" ''' RETURN = ''' @@ -75,7 +80,7 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, 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(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), all_content=dict(default=False, type='bool'), cluster_version=dict(default=None, type='str'), ) 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) @@ -111,19 +120,20 @@ def main(): cluster_version = module.params.get('cluster_version') if cluster_version is not None: hosts = get_filtered_hosts(cluster_version, hosts, connection) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_hosts=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in hosts - ], - ), + result = dict( + ovirt_hosts=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py similarity index 72% rename from lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py index baa74ed5b59..30310b7109b 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py @@ -10,12 +10,14 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_host_storage_facts -short_description: Retrieve facts about one or more oVirt/RHV HostStorages (applicable only for block storage) +module: ovirt_host_storage_info +short_description: Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage) author: "Daniel Erez (@derez)" version_added: "2.4" 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: host: description: @@ -34,21 +36,22 @@ options: - "C(address) - Address of the fibre channel storage server." - "C(port) - Port of the fibre channel storage server." - "C(lun_id) - LUN id." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about HostStorages with specified target and address: -- ovirt_host_storage_facts: +# Gather information about HostStorages with specified target and address: +- ovirt_host_storage_info: host: myhost iscsi: target: iqn.2016-08-09.domain-01:nickname address: 10.34.63.204 + register: result - debug: - var: ovirt_host_storages + msg: "{{ result.ovirt_host_storages }}" ''' RETURN = ''' @@ -71,7 +74,7 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, get_id_by_name, ) @@ -94,12 +97,16 @@ def _get_storage_type(params): def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( host=dict(required=True), iscsi=dict(default=None, type='dict'), fcp=dict(default=None, type='dict'), ) 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) try: @@ -130,19 +137,20 @@ def main(): filterred_host_storages = [host_storage for host_storage in host_storages if host_storage.type == otypes.StorageType.FCP] - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_host_storages=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in filterred_host_storages - ], - ), + result = dict( + ovirt_host_storages=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_network_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_network_info.py similarity index 60% rename from lib/ansible/modules/cloud/ovirt/ovirt_network_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_network_info.py index 964bc91e3b2..cb65aa26e1f 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_network_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_network_info.py @@ -26,21 +26,24 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_network_facts -short_description: Retrieve facts about one or more oVirt/RHV networks +module: ovirt_network_info +short_description: Retrieve information about one or more oVirt/RHV networks author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_networks) fact, which - contains a list of networks." + - "This module returns a variable C(ovirt_networks), which + contains a list of networks. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "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, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all networks which names start with C(vlan1): -- ovirt_network_facts: +# Gather information about all networks which names start with C(vlan1): +- ovirt_network_info: pattern: name=vlan1* + register: result - debug: - var: ovirt_networks + msg: "{{ result.ovirt_networks }}" ''' @@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -88,19 +96,20 @@ def main(): connection = create_connection(auth) networks_service = connection.system_service().networks_service() networks = networks_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_networks=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in networks - ], - ), + result = dict( + ovirt_networks=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py similarity index 64% rename from lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py index a3bb6f0f69d..0b800206973 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_nic_facts -short_description: Retrieve facts about one or more oVirt/RHV virtual machine network interfaces +module: ovirt_nic_info +short_description: Retrieve information about one or more oVirt/RHV virtual machine network interfaces author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_nics) fact, which - contains a list of NICs." + - "This module returns a variable C(ovirt_nics), which + contains a list of NICs. You need to register the result with + the I(register) keyword to use it." options: vm: description: @@ -43,19 +46,20 @@ options: name: description: - "Name of the NIC, can be used as glob expression." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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): -- ovirt_nic_facts: +# Gather information about all NICs which names start with C(eth) for VM named C(centos7): +- ovirt_nic_info: vm: centos7 name: eth* + register: result - debug: - var: ovirt_nics + msg: "{{ result.ovirt_nics }}" ''' RETURN = ''' @@ -74,17 +78,21 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, search_by_name, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( vm=dict(required=True), name=dict(default=None), ) 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) @@ -106,19 +114,20 @@ def main(): else: nics = nics_service.list() - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_nics=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in nics - ], - ), + result = dict( + ovirt_nics=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_permission_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py similarity index 75% rename from lib/ansible/modules/cloud/ovirt/ovirt_permission_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py index c8c77094063..06e41efa41e 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_permission_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_permission_facts -short_description: Retrieve facts about one or more oVirt/RHV permissions +module: ovirt_permission_info +short_description: Retrieve information about one or more oVirt/RHV permissions author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_permissions) fact, which - contains a list of permissions." + - "This module returns a variable C(ovirt_permissions), which + contains a list of permissions. You need to register the result with + the I(register) keyword to use it." options: user_name: description: @@ -51,19 +54,20 @@ options: description: - "Namespace of the authorization provider, where user/group resides." required: false -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all permissions of user with username C(john): -- ovirt_permission_facts: +# Gather information about all permissions of user with username C(john): +- ovirt_permission_info: user_name: john authz_name: example.com-authz + register: result - debug: - var: ovirt_permissions + msg: "{{ result.ovirt_permissions }}" ''' RETURN = ''' @@ -86,7 +90,7 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_link_name, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, search_by_name, ) @@ -115,13 +119,17 @@ def _permissions_service(connection, module): def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( authz_name=dict(required=True, aliases=['domain']), user_name=dict(rdefault=None), group_name=dict(default=None), namespace=dict(default=None), ) 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) @@ -138,10 +146,11 @@ def main(): newperm['%s_id' % key[1:]] = value.id permissions.append(newperm) - module.exit_json( - changed=False, - ansible_facts=dict(ovirt_permissions=permissions), - ) + result = dict(ovirt_permissions=permissions) + if is_old_facts: + module.exit_json(changed=False, ansible_facts=result) + else: + module.exit_json(changed=False, **result) except Exception as e: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py similarity index 65% rename from lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py index 89edcf0b07f..a1013ec67ff 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_quota_facts -short_description: Retrieve facts about one or more oVirt/RHV quotas +module: ovirt_quota_info +short_description: Retrieve information about one or more oVirt/RHV quotas version_added: "2.3" author: "Maor Lipchuk (@machacekondra)" 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: - - "This module creates a new top-level C(ovirt_quotas) fact, which - contains a list of quotas." + - "This module returns a variable C(ovirt_quotas), which + contains a list of quotas. You need to register the result with + the I(register) keyword to use it." options: data_center: description: @@ -43,19 +46,20 @@ options: name: description: - "Name of the quota, can be used as glob expression." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about quota named C in Default datacenter: -- ovirt_quota_facts: +# Gather information about quota named C in Default datacenter: +- ovirt_quota_info: data_center: Default name: myquota + register: result - debug: - var: ovirt_quotas + msg: "{{ result.ovirt_quotas }}" ''' RETURN = ''' @@ -74,17 +78,21 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, search_by_name, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( data_center=dict(required=True), name=dict(default=None), ) 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) @@ -106,19 +114,20 @@ def main(): else: quotas = quotas_service.list() - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_quotas=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in quotas - ], - ), + result = dict( + ovirt_quotas=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_info.py similarity index 63% rename from lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_info.py index d1f1a769a4d..f238a44be1a 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_scheduling_policy_facts -short_description: Retrieve facts about one or more oVirt scheduling policies +module: ovirt_scheduling_policy_info +short_description: Retrieve information about one or more oVirt scheduling policies author: "Ondra Machacek (@machacekondra)" version_added: "2.4" 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: - - "This module creates a new top-level C(ovirt_scheduling_policies) fact, - which contains a list of scheduling policies." + - "This module returns a variable C(ovirt_scheduling_policies), + which contains a list of scheduling policies. You need to register the result with + the I(register) keyword to use it." options: id: description: @@ -43,18 +46,19 @@ options: name: description: - "Name of the scheduling policy, can be used as glob expression." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all scheduling policies with name InClusterUpgrade: -- ovirt_scheduling_policy_facts: +# Gather information about all scheduling policies with name InClusterUpgrade: +- ovirt_scheduling_policy_info: name: InClusterUpgrade + register: result - debug: - var: ovirt_scheduling_policies + msg: "{{ result.ovirt_scheduling_policies }}" ''' RETURN = ''' @@ -75,16 +79,20 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( id=dict(default=None), name=dict(default=None), ) 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) @@ -105,19 +113,20 @@ def main(): else: sched_policies = sched_policies_service.list() - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_scheduling_policies=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in sched_policies - ], - ), + result = dict( + ovirt_scheduling_policies=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py similarity index 60% rename from lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py index d9a9ff8683c..0d21e2fe7ca 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py @@ -12,15 +12,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_snapshot_facts -short_description: Retrieve facts about one or more oVirt/RHV virtual machine snapshots +module: ovirt_snapshot_info +short_description: Retrieve information about one or more oVirt/RHV virtual machine snapshots author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_snapshots) fact, which - contains a list of snapshots." + - "This module returns a variable C(ovirt_snapshots), which + contains a list of snapshots. You need to register the result with + the I(register) keyword to use it." options: vm: description: @@ -31,20 +34,21 @@ options: - "Description of the snapshot, can be used as glob expression." snapshot_id: description: - - "Id of the snapshot we want to retrieve facts about." -extends_documentation_fragment: ovirt_facts + - "Id of the snapshot we want to retrieve information about." +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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): -- ovirt_snapshot_facts: +# Gather information about all snapshots which description start with C(update) for VM named C(centos7): +- ovirt_snapshot_info: vm: centos7 description: update* + register: result - debug: - var: ovirt_snapshots + msg: "{{ result.ovirt_snapshots }}" ''' RETURN = ''' @@ -64,18 +68,22 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, search_by_name, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( vm=dict(required=True), description=dict(default=None), snapshot_id=dict(default=None), ) 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) @@ -101,19 +109,20 @@ def main(): else: snapshots = snapshots_service.list() - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_snapshots=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in snapshots - ], - ), + result = dict( + ovirt_snapshots=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py similarity index 60% rename from lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py index bc8420b96d2..6e446e30c28 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py @@ -26,34 +26,38 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_storage_domain_facts -short_description: Retrieve facts about one or more oVirt/RHV storage domains +module: ovirt_storage_domain_info +short_description: Retrieve information about one or more oVirt/RHV storage domains author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_storage_domains) fact, which - contains a list of storage domains." + - "This module returns a variable C(ovirt_storage_domains), which + contains a list of storage domains. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "For example to search storage domain X from datacenter Y use following pattern: name=X and datacenter=Y" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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): -- ovirt_storage_domain_facts: +- ovirt_storage_domain_info: pattern: name=data* and datacenter=west + register: result - debug: - var: ovirt_storage_domains + msg: "{{ result.ovirt_storage_domains }}" ''' RETURN = ''' @@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -88,19 +96,20 @@ def main(): connection = create_connection(auth) storage_domains_service = connection.system_service().storage_domains_service() storage_domains = storage_domains_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_storage_domains=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in storage_domains - ], - ), + result = dict( + ovirt_storage_domains=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py similarity index 65% rename from lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py index 6b1a35c7f98..5118e419d46 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_storage_template_facts -short_description: Retrieve facts about one or more oVirt/RHV templates relate to a storage domain. +module: ovirt_storage_template_info +short_description: Retrieve information about one or more oVirt/RHV templates relate to a storage domain. author: "Maor Lipchuk (@machacekondra)" version_added: "2.4" 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: - - "This module creates a new top-level C(ovirt_storage_templates) fact, which - contains a list of templates." + - "This module returns a variable C(ovirt_storage_templates), which + contains a list of templates. You need to register the result with + the I(register) keyword to use it." options: unregistered: description: @@ -48,19 +51,20 @@ options: storage_domain: description: - "The storage domain name where the templates should be listed." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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: -- ovirt_storage_template_facts: +- ovirt_storage_template_info: unregistered=True + register: result - debug: - var: ovirt_storage_templates + msg: "{{ result.ovirt_storage_templates }}" ''' RETURN = ''' @@ -78,18 +82,22 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, get_id_by_name ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( storage_domain=dict(default=None), max=dict(default=None, type='int'), unregistered=dict(default=False, type='bool'), ) 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) @@ -106,19 +114,20 @@ def main(): templates = templates_service.list(unregistered=True) else: templates = templates_service.list(max=module.params['max']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_storage_templates=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in templates - ], - ), + result = dict( + ovirt_storage_templates=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py similarity index 66% rename from lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py index 111b461d149..99a5248451f 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_storage_vm_facts -short_description: Retrieve facts about one or more oVirt/RHV virtual machines relate to a storage domain. +module: ovirt_storage_vm_info +short_description: Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain. author: "Maor Lipchuk (@machacekondra)" version_added: "2.4" 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: - - "This module creates a new top-level C(ovirt_storage_vms) fact, which - contains a list of virtual machines." + - "This module returns a variable C(ovirt_storage_vms), which + contains a list of virtual machines. You need to register the result with + the I(register) keyword to use it." options: unregistered: description: @@ -48,19 +51,20 @@ options: storage_domain: description: - "The storage domain name where the virtual machines should be listed." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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: -- ovirt_vms_facts: +- ovirt_vms_info: unregistered=True + register: result - debug: - var: ovirt_storage_vms + msg: "{{ result.ovirt_storage_vms }}" ''' RETURN = ''' @@ -78,18 +82,22 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, get_id_by_name ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( storage_domain=dict(default=None), max=dict(default=None, type='int'), unregistered=dict(default=False, type='bool'), ) 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) @@ -106,19 +114,20 @@ def main(): vms = vms_service.list(unregistered=True) else: vms = vms_service.list() - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_storage_vms=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in vms - ], - ), + result = dict( + ovirt_storage_vms=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py similarity index 67% rename from lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py index 1201f4cb444..1ef257b13db 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_tag_facts -short_description: Retrieve facts about one or more oVirt/RHV tags +module: ovirt_tag_info +short_description: Retrieve information about one or more oVirt/RHV tags author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_tags) fact, which - contains a list of tags" + - "This module returns a variable C(ovirt_tags), which + contains a list of tags. You need to register the result with + the I(register) keyword to use it." options: name: description: @@ -45,30 +48,33 @@ options: host: description: - "Name of the host, which tags should be listed." -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all tags, which names start with C(tag): -- ovirt_tag_facts: +# Gather information about all tags, which names start with C(tag): +- ovirt_tag_info: name: tag* + register: result - debug: - var: tags + msg: "{{ result.ovirt_tags }}" -# Gather facts about all tags, which are assigned to VM C(postgres): -- ovirt_tag_facts: +# Gather information about all tags, which are assigned to VM C(postgres): +- ovirt_tag_info: vm: postgres + register: result - debug: - var: tags + msg: "{{ result.ovirt_tags }}" -# Gather facts about all tags, which are assigned to host C(west): -- ovirt_tag_facts: +# Gather information about all tags, which are assigned to host C(west): +- ovirt_tag_info: host: west + register: result - debug: - var: tags + msg: "{{ result.ovirt_tags }}" ''' RETURN = ''' @@ -87,18 +93,22 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, search_by_name, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( name=dict(default=None), host=dict(default=None), vm=dict(default=None), ) 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) @@ -133,19 +143,20 @@ def main(): if not (module.params['vm'] or module.params['host'] or module.params['name']): tags = all_tags - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_tags=[ - get_dict_of_struct( - struct=t, - connection=connection, - fetch_nested=module.params['fetch_nested'], - attributes=module.params['nested_attributes'], - ) for t in tags - ], - ), + result = dict( + ovirt_tags=[ + get_dict_of_struct( + struct=t, + connection=connection, + fetch_nested=module.params['fetch_nested'], + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_template_info.py similarity index 61% rename from lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_template_info.py index b4a618db9f2..72b8b1504aa 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_template_info.py @@ -26,34 +26,38 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_template_facts -short_description: Retrieve facts about one or more oVirt/RHV templates +module: ovirt_template_info +short_description: Retrieve information about one or more oVirt/RHV templates author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_templates) fact, which - contains a list of templates." + - "This module returns a variable C(ovirt_templates), which + contains a list of templates. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "For example to search template X from datacenter Y use following pattern: name=X and datacenter=Y" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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): -- ovirt_template_facts: +- ovirt_template_info: pattern: name=centos* and datacenter=west + register: result - debug: - var: ovirt_templates + msg: "{{ result.ovirt_templates }}" ''' RETURN = ''' @@ -71,15 +75,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -88,19 +96,20 @@ def main(): connection = create_connection(auth) templates_service = connection.system_service().templates_service() templates = templates_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_templates=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in templates - ], - ), + result = dict( + ovirt_templates=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_user_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_user_info.py similarity index 60% rename from lib/ansible/modules/cloud/ovirt/ovirt_user_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_user_info.py index 0031f734a36..117ddddb383 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_user_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_user_info.py @@ -26,32 +26,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_user_facts -short_description: Retrieve facts about one or more oVirt/RHV users +module: ovirt_user_info +short_description: Retrieve information about one or more oVirt/RHV users author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_users) fact, which - contains a list of users." + - "This module returns a variable C(ovirt_users), which + contains a list of users. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "For example to search user X use following pattern: name=X" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all users which first names start with C(john): -- ovirt_user_facts: +# Gather information about all users which first names start with C(john): +- ovirt_user_info: pattern: name=john* + register: result - debug: - var: ovirt_users + msg: "{{ result.ovirt_users }}" ''' RETURN = ''' @@ -69,15 +73,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -86,19 +94,20 @@ def main(): connection = create_connection(auth) users_service = connection.system_service().users_service() users = users_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_users=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in users - ], - ), + result = dict( + ovirt_users=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py similarity index 70% rename from lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py index 8d73ebe452d..9e5a1edff28 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py @@ -26,15 +26,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_vm_facts -short_description: Retrieve facts about one or more oVirt/RHV virtual machines +module: ovirt_vm_info +short_description: Retrieve information about one or more oVirt/RHV virtual machines author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_vms) fact, which - contains a list of virtual machines." + - "This module returns a variable C(ovirt_vms), which + contains a list of virtual machines. You need to register the result with + the I(register) keyword to use it." options: pattern: description: @@ -61,26 +64,28 @@ options: effect when the virtual machine is restarted. By default the value is set by engine." type: bool version_added: "2.8" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # 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): -- ovirt_vm_facts: +- ovirt_vm_info: pattern: name=centos* and cluster=west + register: result - debug: - var: ovirt_vms + msg: "{{ result.ovirt_vms }}" # Gather info about next run configuration of virtual machine named myvm -- ovirt_vm_facts: +- ovirt_vm_info: pattern: name=myvm next_run: true + register: result - debug: - var: ovirt_vms[0] + msg: "{{ result.ovirt_vms[0] }}" ''' RETURN = ''' @@ -98,12 +103,12 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), all_content=dict(default=False, type='bool'), next_run=dict(default=None, type='bool'), @@ -111,6 +116,10 @@ def main(): max=dict(default=None, type='int'), ) 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) @@ -127,19 +136,20 @@ def main(): if module.params['next_run']: vms = [vms_service.vm_service(vm.id).get(next_run=True) for vm in vms] - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_vms=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in vms - ], - ), + result = dict( + ovirt_vms=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py similarity index 60% rename from lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py rename to lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py index 3e97fb1ec52..52f2a5e4943 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py @@ -26,32 +26,36 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: ovirt_vmpool_facts -short_description: Retrieve facts about one or more oVirt/RHV vmpools +module: ovirt_vmpool_info +short_description: Retrieve information about one or more oVirt/RHV vmpools author: "Ondra Machacek (@machacekondra)" version_added: "2.3" 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: - - "This module creates a new top-level C(ovirt_vmpools) fact, which - contains a list of vmpools." + - "This module returns a variable C(ovirt_vmpools), which + contains a list of vmpools. You need to register the result with + the I(register) keyword to use it." options: pattern: description: - "Search term which is accepted by oVirt/RHV search backend." - "For example to search vmpool X: name=X" -extends_documentation_fragment: ovirt_facts +extends_documentation_fragment: ovirt_info ''' EXAMPLES = ''' # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: -# Gather facts about all vm pools which names start with C(centos): -- ovirt_vmpool_facts: +# Gather information about all vm pools which names start with C(centos): +- ovirt_vmpool_info: pattern: name=centos* + register: result - debug: - var: ovirt_vmpools + msg: "{{ result.ovirt_vm_pools }}" ''' RETURN = ''' @@ -69,15 +73,19 @@ from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, - ovirt_facts_full_argument_spec, + ovirt_info_full_argument_spec, ) def main(): - argument_spec = ovirt_facts_full_argument_spec( + argument_spec = ovirt_info_full_argument_spec( pattern=dict(default='', required=False), ) 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) @@ -86,19 +94,20 @@ def main(): connection = create_connection(auth) vmpools_service = connection.system_service().vm_pools_service() vmpools = vmpools_service.list(search=module.params['pattern']) - module.exit_json( - changed=False, - ansible_facts=dict( - ovirt_vm_pools=[ - get_dict_of_struct( - struct=c, - connection=connection, - fetch_nested=module.params.get('fetch_nested'), - attributes=module.params.get('nested_attributes'), - ) for c in vmpools - ], - ), + result = dict( + ovirt_vm_pools=[ + get_dict_of_struct( + struct=c, + connection=connection, + fetch_nested=module.params.get('fetch_nested'), + 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: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: diff --git a/lib/ansible/plugins/doc_fragments/ovirt_facts.py b/lib/ansible/plugins/doc_fragments/ovirt_facts.py deleted file mode 100644 index 374745bcad2..00000000000 --- a/lib/ansible/plugins/doc_fragments/ovirt_facts.py +++ /dev/null @@ -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" -''' diff --git a/lib/ansible/plugins/doc_fragments/ovirt_facts.py b/lib/ansible/plugins/doc_fragments/ovirt_facts.py new file mode 120000 index 00000000000..3a7a597af75 --- /dev/null +++ b/lib/ansible/plugins/doc_fragments/ovirt_facts.py @@ -0,0 +1 @@ +ovirt_info.py \ No newline at end of file diff --git a/lib/ansible/plugins/doc_fragments/ovirt_info.py b/lib/ansible/plugins/doc_fragments/ovirt_info.py new file mode 100644 index 00000000000..2b753e4009c --- /dev/null +++ b/lib/ansible/plugins/doc_fragments/ovirt_info.py @@ -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" +''' diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index c6bc036fa7e..9239049e1a9 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -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:E337 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_facts.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 future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py metaclass-boilerplate +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 metaclass-boilerplate 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:E337 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_cluster_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_datacenter_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_datacenter_info.py metaclass-boilerplate +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 metaclass-boilerplate 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:E337 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_disk_info.py metaclass-boilerplate +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 metaclass-boilerplate 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:E337 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.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_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py metaclass-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py validate-modules:E317 +lib/ansible/modules/cloud/ovirt/ovirt_external_provider_info.py validate-modules:E322 +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 metaclass-boilerplate 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_group_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_group_info.py metaclass-boilerplate +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 metaclass-boilerplate 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:E338 -lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_host_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_host_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_host_info.py metaclass-boilerplate +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 metaclass-boilerplate 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:E337 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_host_storage_facts.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 future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py metaclass-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py validate-modules:E337 +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 metaclass-boilerplate 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 validate-modules:E337 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_network_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_network_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_network_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_nic_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_nic_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_permission_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_permission_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_quota_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_scheduling_policy_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.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 future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_snapshot_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_snapshot_info.py metaclass-boilerplate +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 metaclass-boilerplate 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 validate-modules:E337 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py validate-modules:E337 -lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py validate-modules:E337 -lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py metaclass-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_info.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py metaclass-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py validate-modules:E337 +lib/ansible/modules/cloud/ovirt/ovirt_storage_template_info.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py metaclass-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_storage_vm_info.py validate-modules:E337 +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_tag_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_tag_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_template_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_template_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_template_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_user_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_user_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_user_info.py metaclass-boilerplate +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_vm_facts.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 future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py metaclass-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_vm_info.py validate-modules:E337 +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 metaclass-boilerplate 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_facts.py future-import-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py metaclass-boilerplate -lib/ansible/modules/cloud/ovirt/ovirt_vmpool_facts.py validate-modules:E338 +lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py future-import-boilerplate +lib/ansible/modules/cloud/ovirt/ovirt_vmpool_info.py metaclass-boilerplate +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 metaclass-boilerplate 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/ovirt.py future-import-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_facts.py metaclass-boilerplate +lib/ansible/plugins/doc_fragments/ovirt_info.py future-import-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 metaclass-boilerplate lib/ansible/plugins/doc_fragments/postgres.py future-import-boilerplate