From d96e56048f1b2e269f3a274fa81be42b77976887 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:48:15 +1300 Subject: [PATCH] [onev ... ovh]*.py: normalize docs (#9373) * [onev ... ovh]*.py: normalize docs * Apply suggestions from code review Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- plugins/modules/oneview_datacenter_info.py | 62 +++---- plugins/modules/oneview_enclosure_info.py | 86 +++++---- plugins/modules/oneview_ethernet_network.py | 88 +++++---- .../modules/oneview_ethernet_network_info.py | 68 ++++--- plugins/modules/oneview_fc_network.py | 64 ++++--- plugins/modules/oneview_fc_network_info.py | 44 +++-- plugins/modules/oneview_fcoe_network.py | 66 ++++--- plugins/modules/oneview_fcoe_network_info.py | 44 +++-- .../oneview_logical_interconnect_group.py | 84 +++++---- ...oneview_logical_interconnect_group_info.py | 44 +++-- plugins/modules/oneview_network_set.py | 76 ++++---- plugins/modules/oneview_network_set_info.py | 61 +++--- plugins/modules/oneview_san_manager.py | 73 ++++---- plugins/modules/oneview_san_manager_info.py | 62 +++---- plugins/modules/online_server_info.py | 18 +- plugins/modules/online_user_info.py | 14 +- plugins/modules/open_iscsi.py | 174 +++++++++--------- plugins/modules/openbsd_pkg.py | 120 ++++++------ plugins/modules/opendj_backendprop.py | 157 ++++++++-------- plugins/modules/openwrt_init.py | 76 ++++---- plugins/modules/opkg.py | 113 ++++++------ plugins/modules/osx_defaults.py | 24 ++- plugins/modules/ovh_ip_failover.py | 141 +++++++------- .../modules/ovh_ip_loadbalancing_backend.py | 139 +++++++------- plugins/modules/ovh_monthly_billing.py | 79 ++++---- 25 files changed, 956 insertions(+), 1021 deletions(-) diff --git a/plugins/modules/oneview_datacenter_info.py b/plugins/modules/oneview_datacenter_info.py index ed04e2279f..831bd59f61 100644 --- a/plugins/modules/oneview_datacenter_info.py +++ b/plugins/modules/oneview_datacenter_info.py @@ -7,43 +7,41 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_datacenter_info short_description: Retrieve information about the OneView Data Centers description: - - Retrieve information about the OneView Data Centers. + - Retrieve information about the OneView Data Centers. requirements: - - "hpOneView >= 2.0.1" + - "hpOneView >= 2.0.1" author: - - Alex Monteiro (@aalexmonteiro) - - Madhav Bharadwaj (@madhav-bharadwaj) - - Priyanka Sood (@soodpr) - - Ricardo Galeno (@ricardogpsf) + - Alex Monteiro (@aalexmonteiro) + - Madhav Bharadwaj (@madhav-bharadwaj) + - Priyanka Sood (@soodpr) + - Ricardo Galeno (@ricardogpsf) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - name: - description: - - Data Center name. - type: str - options: - description: - - "Retrieve additional information. Options available: 'visualContent'." - type: list - elements: str + name: + description: + - Data Center name. + type: str + options: + description: + - "Retrieve additional information. Options available: V(visualContent)." + type: list + elements: str extends_documentation_fragment: - community.general.oneview - community.general.oneview.factsparams - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all Data Centers community.general.oneview_datacenter_info: hostname: 172.16.101.48 @@ -107,19 +105,19 @@ EXAMPLES = ''' - name: Print fetched information about Data Center Visual Content ansible.builtin.debug: msg: "{{ result.datacenter_visual_content }}" -''' +""" -RETURN = ''' +RETURN = r""" datacenters: - description: Has all the OneView information about the Data Centers. - returned: Always, but can be null. - type: dict + description: Has all the OneView information about the Data Centers. + returned: Always, but can be null. + type: dict datacenter_visual_content: - description: Has information about the Data Center Visual Content. - returned: When requested, but can be null. - type: dict -''' + description: Has information about the Data Center Visual Content. + returned: When requested, but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_enclosure_info.py b/plugins/modules/oneview_enclosure_info.py index 4e203a50ac..21feee769b 100644 --- a/plugins/modules/oneview_enclosure_info.py +++ b/plugins/modules/oneview_enclosure_info.py @@ -8,44 +8,41 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_enclosure_info short_description: Retrieve information about one or more Enclosures description: - - Retrieve information about one or more of the Enclosures from OneView. + - Retrieve information about one or more of the Enclosures from OneView. requirements: - - hpOneView >= 2.0.1 + - hpOneView >= 2.0.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - name: - description: - - Enclosure name. - type: str - options: - description: - - "List with options to gather additional information about an Enclosure and related resources. - Options allowed: V(script), V(environmentalConfiguration), and V(utilization). For the option V(utilization), - you can provide specific parameters." - type: list - elements: raw + name: + description: + - Enclosure name. + type: str + options: + description: + - 'List with options to gather additional information about an Enclosure and related resources. Options allowed: V(script), V(environmentalConfiguration), + and V(utilization). For the option V(utilization), you can provide specific parameters.' + type: list + elements: raw extends_documentation_fragment: - community.general.oneview - community.general.oneview.factsparams - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all Enclosures community.general.oneview_enclosure_info: hostname: 172.16.101.48 @@ -98,9 +95,9 @@ EXAMPLES = ''' community.general.oneview_enclosure_info: name: Test-Enclosure options: - - script # optional - - environmentalConfiguration # optional - - utilization # optional + - script # optional + - environmentalConfiguration # optional + - utilization # optional hostname: 172.16.101.48 username: administrator password: my_password @@ -125,12 +122,11 @@ EXAMPLES = ''' ansible.builtin.debug: msg: "{{ result.enclosure_utilization }}" -- name: "Gather information about an Enclosure with temperature data at a resolution of one sample per day, between two - specified dates" +- name: "Gather information about an Enclosure with temperature data at a resolution of one sample per day, between two specified dates" community.general.oneview_enclosure_info: name: Test-Enclosure options: - - utilization: # optional + - utilization: # optional fields: AmbientTemperature filter: - startDate=2016-07-01T14:29:42.000Z @@ -152,29 +148,29 @@ EXAMPLES = ''' - name: Print fetched information about Enclosure Utilization ansible.builtin.debug: msg: "{{ result.enclosure_utilization }}" -''' +""" -RETURN = ''' +RETURN = r""" enclosures: - description: Has all the OneView information about the Enclosures. - returned: Always, but can be null. - type: dict + description: Has all the OneView information about the Enclosures. + returned: Always, but can be null. + type: dict enclosure_script: - description: Has all the OneView information about the script of an Enclosure. - returned: When requested, but can be null. - type: str + description: Has all the OneView information about the script of an Enclosure. + returned: When requested, but can be null. + type: str enclosure_environmental_configuration: - description: Has all the OneView information about the environmental configuration of an Enclosure. - returned: When requested, but can be null. - type: dict + description: Has all the OneView information about the environmental configuration of an Enclosure. + returned: When requested, but can be null. + type: dict enclosure_utilization: - description: Has all the OneView information about the utilization of an Enclosure. - returned: When requested, but can be null. - type: dict -''' + description: Has all the OneView information about the utilization of an Enclosure. + returned: When requested, but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_ethernet_network.py b/plugins/modules/oneview_ethernet_network.py index 981d949cdc..823fea3b2c 100644 --- a/plugins/modules/oneview_ethernet_network.py +++ b/plugins/modules/oneview_ethernet_network.py @@ -7,46 +7,44 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_ethernet_network short_description: Manage OneView Ethernet Network resources description: - - Provides an interface to manage Ethernet Network resources. Can create, update, or delete. + - Provides an interface to manage Ethernet Network resources. Can create, update, or delete. requirements: - - hpOneView >= 3.1.0 + - hpOneView >= 3.1.0 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - state: - description: - - Indicates the desired state for the Ethernet Network resource. - - V(present) will ensure data properties are compliant with OneView. - - V(absent) will remove the resource from OneView, if it exists. - - V(default_bandwidth_reset) will reset the network connection template to the default. - type: str - default: present - choices: [present, absent, default_bandwidth_reset] - data: - description: - - List with Ethernet Network properties. - type: dict - required: true + state: + description: + - Indicates the desired state for the Ethernet Network resource. + - V(present) will ensure data properties are compliant with OneView. + - V(absent) will remove the resource from OneView, if it exists. + - V(default_bandwidth_reset) will reset the network connection template to the default. + type: str + default: present + choices: [present, absent, default_bandwidth_reset] + data: + description: + - List with Ethernet Network properties. + type: dict + required: true extends_documentation_fragment: - - community.general.oneview - - community.general.oneview.validateetag - - community.general.attributes + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Ensure that the Ethernet Network is present using the default configuration community.general.oneview_ethernet_network: config: '/etc/oneview/oneview_config.json' @@ -64,8 +62,8 @@ EXAMPLES = ''' name: 'Test Ethernet Network' purpose: Management bandwidth: - maximumBandwidth: 3000 - typicalBandwidth: 2000 + maximumBandwidth: 3000 + typicalBandwidth: 2000 delegate_to: localhost - name: Ensure that the Ethernet Network is present with name 'Renamed Ethernet Network' @@ -107,24 +105,24 @@ EXAMPLES = ''' data: name: 'Test Ethernet Network' delegate_to: localhost -''' +""" -RETURN = ''' +RETURN = r""" ethernet_network: - description: Has the facts about the Ethernet Networks. - returned: On state 'present'. Can be null. - type: dict + description: Has the facts about the Ethernet Networks. + returned: On O(state=present). Can be null. + type: dict ethernet_network_bulk: - description: Has the facts about the Ethernet Networks affected by the bulk insert. - returned: When 'vlanIdRange' attribute is in data argument. Can be null. - type: dict + description: Has the facts about the Ethernet Networks affected by the bulk insert. + returned: When V(vlanIdRange) attribute is in O(data) argument. Can be null. + type: dict ethernet_network_connection_template: - description: Has the facts about the Ethernet Network Connection Template. - returned: On state 'default_bandwidth_reset'. Can be null. - type: dict -''' + description: Has the facts about the Ethernet Network Connection Template. + returned: On O(state=default_bandwidth_reset). Can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound diff --git a/plugins/modules/oneview_ethernet_network_info.py b/plugins/modules/oneview_ethernet_network_info.py index 7da008b04e..6eb4f46a19 100644 --- a/plugins/modules/oneview_ethernet_network_info.py +++ b/plugins/modules/oneview_ethernet_network_info.py @@ -7,42 +7,40 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_ethernet_network_info short_description: Retrieve the information about one or more of the OneView Ethernet Networks description: - - Retrieve the information about one or more of the Ethernet Networks from OneView. + - Retrieve the information about one or more of the Ethernet Networks from OneView. requirements: - - hpOneView >= 2.0.1 + - hpOneView >= 2.0.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - name: - description: - - Ethernet Network name. - type: str - options: - description: - - "List with options to gather additional information about an Ethernet Network and related resources. - Options allowed: V(associatedProfiles) and V(associatedUplinkGroups)." - type: list - elements: str + name: + description: + - Ethernet Network name. + type: str + options: + description: + - 'List with options to gather additional information about an Ethernet Network and related resources. Options allowed: V(associatedProfiles) + and V(associatedUplinkGroups).' + type: list + elements: str extends_documentation_fragment: - community.general.oneview - community.general.oneview.factsparams - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all Ethernet Networks community.general.oneview_ethernet_network_info: config: /etc/oneview/oneview_config.json @@ -96,24 +94,24 @@ EXAMPLES = ''' - name: Print fetched information about Ethernet Network Associated Uplink Groups ansible.builtin.debug: msg: "{{ result.enet_associated_uplink_groups }}" -''' +""" -RETURN = ''' +RETURN = r""" ethernet_networks: - description: Has all the OneView information about the Ethernet Networks. - returned: Always, but can be null. - type: dict + description: Has all the OneView information about the Ethernet Networks. + returned: Always, but can be null. + type: dict enet_associated_profiles: - description: Has all the OneView information about the profiles which are using the Ethernet network. - returned: When requested, but can be null. - type: dict + description: Has all the OneView information about the profiles which are using the Ethernet network. + returned: When requested, but can be null. + type: dict enet_associated_uplink_groups: - description: Has all the OneView information about the uplink sets which are using the Ethernet network. - returned: When requested, but can be null. - type: dict -''' + description: Has all the OneView information about the uplink sets which are using the Ethernet network. + returned: When requested, but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_fc_network.py b/plugins/modules/oneview_fc_network.py index 9f0c4358b7..312a5dc893 100644 --- a/plugins/modules/oneview_fc_network.py +++ b/plugins/modules/oneview_fc_network.py @@ -7,43 +7,41 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_fc_network short_description: Manage OneView Fibre Channel Network resources description: - - Provides an interface to manage Fibre Channel Network resources. Can create, update, and delete. + - Provides an interface to manage Fibre Channel Network resources. Can create, update, and delete. requirements: - - "hpOneView >= 4.0.0" + - "hpOneView >= 4.0.0" author: "Felipe Bulsoni (@fgbulsoni)" attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - state: - description: - - Indicates the desired state for the Fibre Channel Network resource. - V(present) will ensure data properties are compliant with OneView. - V(absent) will remove the resource from OneView, if it exists. - type: str - choices: ['present', 'absent'] - required: true - data: - description: - - List with the Fibre Channel Network properties. - type: dict - required: true + state: + description: + - Indicates the desired state for the Fibre Channel Network resource. + - V(present) will ensure data properties are compliant with OneView. + - V(absent) will remove the resource from OneView, if it exists. + type: str + choices: ['present', 'absent'] + required: true + data: + description: + - List with the Fibre Channel Network properties. + type: dict + required: true extends_documentation_fragment: - - community.general.oneview - - community.general.oneview.validateetag - - community.general.attributes + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Ensure that the Fibre Channel Network is present using the default configuration community.general.oneview_fc_network: config: "{{ config_file_path }}" @@ -75,14 +73,14 @@ EXAMPLES = ''' state: absent data: name: 'New FC Network' -''' +""" -RETURN = ''' +RETURN = r""" fc_network: - description: Has the facts about the managed OneView FC Network. - returned: On state 'present'. Can be null. - type: dict -''' + description: Has the facts about the managed OneView FC Network. + returned: On O(state=present). Can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_fc_network_info.py b/plugins/modules/oneview_fc_network_info.py index 096af48308..af20869dc3 100644 --- a/plugins/modules/oneview_fc_network_info.py +++ b/plugins/modules/oneview_fc_network_info.py @@ -7,37 +7,35 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_fc_network_info short_description: Retrieve the information about one or more of the OneView Fibre Channel Networks description: - - Retrieve the information about one or more of the Fibre Channel Networks from OneView. + - Retrieve the information about one or more of the Fibre Channel Networks from OneView. requirements: - - hpOneView >= 2.0.1 + - hpOneView >= 2.0.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - name: - description: - - Fibre Channel Network name. - type: str + name: + description: + - Fibre Channel Network name. + type: str extends_documentation_fragment: - community.general.oneview - community.general.oneview.factsparams - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all Fibre Channel Networks community.general.oneview_fc_network_info: config: /etc/oneview/oneview_config.json @@ -73,14 +71,14 @@ EXAMPLES = ''' - name: Print fetched information about Fibre Channel Network found by name ansible.builtin.debug: msg: "{{ result.fc_networks }}" -''' +""" -RETURN = ''' +RETURN = r""" fc_networks: - description: Has all the OneView information about the Fibre Channel Networks. - returned: Always, but can be null. - type: dict -''' + description: Has all the OneView information about the Fibre Channel Networks. + returned: Always, but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_fcoe_network.py b/plugins/modules/oneview_fcoe_network.py index e1216b1d95..15128bd372 100644 --- a/plugins/modules/oneview_fcoe_network.py +++ b/plugins/modules/oneview_fcoe_network.py @@ -7,44 +7,42 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_fcoe_network short_description: Manage OneView FCoE Network resources description: - - Provides an interface to manage FCoE Network resources. Can create, update, or delete. + - Provides an interface to manage FCoE Network resources. Can create, update, or delete. requirements: - - "Python >= 2.7.9" - - "hpOneView >= 4.0.0" + - "Python >= 2.7.9" + - "hpOneView >= 4.0.0" author: "Felipe Bulsoni (@fgbulsoni)" attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - state: - description: - - Indicates the desired state for the FCoE Network resource. - V(present) will ensure data properties are compliant with OneView. - V(absent) will remove the resource from OneView, if it exists. - type: str - default: present - choices: ['present', 'absent'] - data: - description: - - List with FCoE Network properties. - type: dict - required: true + state: + description: + - Indicates the desired state for the FCoE Network resource. + - V(present) will ensure data properties are compliant with OneView. + - V(absent) will remove the resource from OneView, if it exists. + type: str + default: present + choices: ['present', 'absent'] + data: + description: + - List with FCoE Network properties. + type: dict + required: true extends_documentation_fragment: - - community.general.oneview - - community.general.oneview.validateetag - - community.general.attributes + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Ensure that FCoE Network is present using the default configuration community.general.oneview_fcoe_network: config: '/etc/oneview/oneview_config.json' @@ -72,14 +70,14 @@ EXAMPLES = ''' data: name: New FCoE Network delegate_to: localhost -''' +""" -RETURN = ''' +RETURN = r""" fcoe_network: - description: Has the facts about the OneView FCoE Networks. - returned: On state 'present'. Can be null. - type: dict -''' + description: Has the facts about the OneView FCoE Networks. + returned: On O(state=present). Can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_fcoe_network_info.py b/plugins/modules/oneview_fcoe_network_info.py index b3460d59aa..6d5074be4a 100644 --- a/plugins/modules/oneview_fcoe_network_info.py +++ b/plugins/modules/oneview_fcoe_network_info.py @@ -7,36 +7,34 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_fcoe_network_info short_description: Retrieve the information about one or more of the OneView FCoE Networks description: - - Retrieve the information about one or more of the FCoE Networks from OneView. + - Retrieve the information about one or more of the FCoE Networks from OneView. requirements: - - hpOneView >= 2.0.1 + - hpOneView >= 2.0.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - name: - description: - - FCoE Network name. - type: str + name: + description: + - FCoE Network name. + type: str extends_documentation_fragment: - community.general.oneview - community.general.oneview.factsparams - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all FCoE Networks community.general.oneview_fcoe_network_info: config: /etc/oneview/oneview_config.json @@ -72,14 +70,14 @@ EXAMPLES = ''' - name: Print fetched information about FCoE Network found by name ansible.builtin.debug: msg: "{{ result.fcoe_networks }}" -''' +""" -RETURN = ''' +RETURN = r""" fcoe_networks: - description: Has all the OneView information about the FCoE Networks. - returned: Always, but can be null. - type: dict -''' + description: Has all the OneView information about the FCoE Networks. + returned: Always, but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_logical_interconnect_group.py b/plugins/modules/oneview_logical_interconnect_group.py index d1303f011a..866dabc6b8 100644 --- a/plugins/modules/oneview_logical_interconnect_group.py +++ b/plugins/modules/oneview_logical_interconnect_group.py @@ -8,45 +8,43 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_logical_interconnect_group short_description: Manage OneView Logical Interconnect Group resources description: - - Provides an interface to manage Logical Interconnect Group resources. Can create, update, or delete. + - Provides an interface to manage Logical Interconnect Group resources. Can create, update, or delete. requirements: - - hpOneView >= 4.0.0 + - hpOneView >= 4.0.0 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - state: - description: - - Indicates the desired state for the Logical Interconnect Group resource. - V(absent) will remove the resource from OneView, if it exists. - V(present) will ensure data properties are compliant with OneView. - type: str - choices: [absent, present] - default: present - data: - description: - - List with the Logical Interconnect Group properties. - type: dict - required: true + state: + description: + - Indicates the desired state for the Logical Interconnect Group resource. + - V(absent) will remove the resource from OneView, if it exists. + - V(present) will ensure data properties are compliant with OneView. + type: str + choices: [absent, present] + default: present + data: + description: + - List with the Logical Interconnect Group properties. + type: dict + required: true extends_documentation_fragment: - - community.general.oneview - - community.general.oneview.validateetag - - community.general.attributes + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Ensure that the Logical Interconnect Group is present community.general.oneview_logical_interconnect_group: config: /etc/oneview/oneview_config.json @@ -57,15 +55,15 @@ EXAMPLES = ''' enclosureType: C7000 interconnectMapTemplate: interconnectMapEntryTemplates: - - logicalDownlinkUri: ~ + - logicalDownlinkUri: logicalLocation: - locationEntries: - - relativeValue: 1 - type: Bay - - relativeValue: 1 - type: Enclosure + locationEntries: + - relativeValue: 1 + type: Bay + - relativeValue: 1 + type: Enclosure permittedInterconnectTypeName: HP VC Flex-10/10D Module - # Alternatively you can inform permittedInterconnectTypeUri + # Alternatively you can inform permittedInterconnectTypeUri delegate_to: localhost - name: Ensure that the Logical Interconnect Group has the specified scopes @@ -95,14 +93,14 @@ EXAMPLES = ''' data: name: New Logical Interconnect Group delegate_to: localhost -''' +""" -RETURN = ''' +RETURN = r""" logical_interconnect_group: - description: Has the facts about the OneView Logical Interconnect Group. - returned: On state 'present'. Can be null. - type: dict -''' + description: Has the facts about the OneView Logical Interconnect Group. + returned: On O(state=present). Can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound diff --git a/plugins/modules/oneview_logical_interconnect_group_info.py b/plugins/modules/oneview_logical_interconnect_group_info.py index 6f6a908f29..1c9e415d0e 100644 --- a/plugins/modules/oneview_logical_interconnect_group_info.py +++ b/plugins/modules/oneview_logical_interconnect_group_info.py @@ -8,36 +8,34 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_logical_interconnect_group_info short_description: Retrieve information about one or more of the OneView Logical Interconnect Groups description: - - Retrieve information about one or more of the Logical Interconnect Groups from OneView + - Retrieve information about one or more of the Logical Interconnect Groups from OneView. requirements: - - hpOneView >= 2.0.1 + - hpOneView >= 2.0.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - name: - description: - - Logical Interconnect Group name. - type: str + name: + description: + - Logical Interconnect Group name. + type: str extends_documentation_fragment: - community.general.oneview - community.general.oneview.factsparams - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all Logical Interconnect Groups community.general.oneview_logical_interconnect_group_info: hostname: 172.16.101.48 @@ -85,14 +83,14 @@ EXAMPLES = ''' - name: Print fetched information about Logical Interconnect Group found by name ansible.builtin.debug: msg: "{{ result.logical_interconnect_groups }}" -''' +""" -RETURN = ''' +RETURN = r""" logical_interconnect_groups: - description: Has all the OneView information about the Logical Interconnect Groups. - returned: Always, but can be null. - type: dict -''' + description: Has all the OneView information about the Logical Interconnect Groups. + returned: Always, but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_network_set.py b/plugins/modules/oneview_network_set.py index 0efd417d63..a7fae51f21 100644 --- a/plugins/modules/oneview_network_set.py +++ b/plugins/modules/oneview_network_set.py @@ -7,46 +7,44 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_network_set short_description: Manage HPE OneView Network Set resources description: - - Provides an interface to manage Network Set resources. Can create, update, or delete. + - Provides an interface to manage Network Set resources. Can create, update, or delete. requirements: - - hpOneView >= 4.0.0 + - hpOneView >= 4.0.0 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - state: - description: - - Indicates the desired state for the Network Set resource. - - V(present) will ensure data properties are compliant with OneView. - - V(absent) will remove the resource from OneView, if it exists. - type: str - default: present - choices: ['present', 'absent'] - data: - description: - - List with the Network Set properties. - type: dict - required: true + state: + description: + - Indicates the desired state for the Network Set resource. + - V(present) will ensure data properties are compliant with OneView. + - V(absent) will remove the resource from OneView, if it exists. + type: str + default: present + choices: ['present', 'absent'] + data: + description: + - List with the Network Set properties. + type: dict + required: true extends_documentation_fragment: - - community.general.oneview - - community.general.oneview.validateetag - - community.general.attributes + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Create a Network Set community.general.oneview_network_set: config: /etc/oneview/oneview_config.json @@ -54,8 +52,8 @@ EXAMPLES = ''' data: name: OneViewSDK Test Network Set networkUris: - - Test Ethernet Network_1 # can be a name - - /rest/ethernet-networks/e4360c9d-051d-4931-b2aa-7de846450dd8 # or a URI + - Test Ethernet Network_1 # can be a name + - /rest/ethernet-networks/e4360c9d-051d-4931-b2aa-7de846450dd8 # or a URI delegate_to: localhost - name: Update the Network Set name to 'OneViewSDK Test Network Set - Renamed' and change the associated networks @@ -74,7 +72,7 @@ EXAMPLES = ''' config: /etc/oneview/oneview_config.json state: absent data: - name: OneViewSDK Test Network Set - Renamed + name: OneViewSDK Test Network Set - Renamed delegate_to: localhost - name: Update the Network set with two scopes @@ -87,14 +85,14 @@ EXAMPLES = ''' - /rest/scopes/01SC123456 - /rest/scopes/02SC123456 delegate_to: localhost -''' +""" -RETURN = ''' +RETURN = r""" network_set: - description: Has the facts about the Network Set. - returned: On state 'present', but can be null. - type: dict -''' + description: Has the facts about the Network Set. + returned: On O(state=present), but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound diff --git a/plugins/modules/oneview_network_set_info.py b/plugins/modules/oneview_network_set_info.py index cef53d8fcd..f3a4ace3da 100644 --- a/plugins/modules/oneview_network_set_info.py +++ b/plugins/modules/oneview_network_set_info.py @@ -7,45 +7,42 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_network_set_info short_description: Retrieve information about the OneView Network Sets description: - - Retrieve information about the Network Sets from OneView. + - Retrieve information about the Network Sets from OneView. requirements: - - hpOneView >= 2.0.1 + - hpOneView >= 2.0.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - name: - description: - - Network Set name. - type: str + name: + description: + - Network Set name. + type: str - options: - description: - - "List with options to gather information about Network Set. - Option allowed: V(withoutEthernet). - The option V(withoutEthernet) retrieves the list of network_sets excluding Ethernet networks." - type: list - elements: str + options: + description: + - 'List with options to gather information about Network Set. Option allowed: V(withoutEthernet). The option V(withoutEthernet) retrieves + the list of network_sets excluding Ethernet networks.' + type: list + elements: str extends_documentation_fragment: - community.general.oneview - community.general.oneview.factsparams - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all Network Sets community.general.oneview_network_set_info: hostname: 172.16.101.48 @@ -86,7 +83,7 @@ EXAMPLES = ''' password: my_password api_version: 500 options: - - withoutEthernet + - withoutEthernet no_log: true delegate_to: localhost register: result @@ -118,7 +115,7 @@ EXAMPLES = ''' api_version: 500 name: Name of the Network Set options: - - withoutEthernet + - withoutEthernet no_log: true delegate_to: localhost register: result @@ -126,14 +123,14 @@ EXAMPLES = ''' - name: Print fetched information about Network Set found by name, excluding Ethernet networks ansible.builtin.debug: msg: "{{ result.network_sets }}" -''' +""" -RETURN = ''' +RETURN = r""" network_sets: - description: Has all the OneView information about the Network Sets. - returned: Always, but can be empty. - type: dict -''' + description: Has all the OneView information about the Network Sets. + returned: Always, but can be empty. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/oneview_san_manager.py b/plugins/modules/oneview_san_manager.py index 15282aec21..8c03bda463 100644 --- a/plugins/modules/oneview_san_manager.py +++ b/plugins/modules/oneview_san_manager.py @@ -7,47 +7,46 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_san_manager short_description: Manage OneView SAN Manager resources description: - - Provides an interface to manage SAN Manager resources. Can create, update, or delete. + - Provides an interface to manage SAN Manager resources. Can create, update, or delete. requirements: - - hpOneView >= 3.1.1 + - hpOneView >= 3.1.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - state: - description: - - Indicates the desired state for the Uplink Set resource. - - V(present) ensures data properties are compliant with OneView. - - V(absent) removes the resource from OneView, if it exists. - - V(connection_information_set) updates the connection information for the SAN Manager. This operation is non-idempotent. - type: str - default: present - choices: [present, absent, connection_information_set] - data: - description: - - List with SAN Manager properties. - type: dict - required: true + state: + description: + - Indicates the desired state for the Uplink Set resource. + - V(present) ensures data properties are compliant with OneView. + - V(absent) removes the resource from OneView, if it exists. + - V(connection_information_set) updates the connection information for the SAN Manager. + This operation is non-idempotent. + type: str + default: present + choices: [present, absent, connection_information_set] + data: + description: + - List with SAN Manager properties. + type: dict + required: true extends_documentation_fragment: - - community.general.oneview - - community.general.oneview.validateetag - - community.general.attributes + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Creates a Device Manager for the Brocade SAN provider with the given hostname and credentials community.general.oneview_san_manager: config: /etc/oneview/oneview_config.json @@ -123,14 +122,14 @@ EXAMPLES = ''' data: name: '172.18.15.1' delegate_to: localhost -''' +""" -RETURN = ''' +RETURN = r""" san_manager: - description: Has the OneView facts about the SAN Manager. - returned: On state 'present'. Can be null. - type: dict -''' + description: Has the OneView facts about the SAN Manager. + returned: On O(state=present). Can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleValueError diff --git a/plugins/modules/oneview_san_manager_info.py b/plugins/modules/oneview_san_manager_info.py index f994280ca8..63797e298e 100644 --- a/plugins/modules/oneview_san_manager_info.py +++ b/plugins/modules/oneview_san_manager_info.py @@ -7,44 +7,42 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: oneview_san_manager_info short_description: Retrieve information about one or more of the OneView SAN Managers description: - - Retrieve information about one or more of the SAN Managers from OneView + - Retrieve information about one or more of the SAN Managers from OneView. requirements: - - hpOneView >= 2.0.1 + - hpOneView >= 2.0.1 author: - - Felipe Bulsoni (@fgbulsoni) - - Thiago Miotto (@tmiotto) - - Adriane Cardozo (@adriane-cardozo) + - Felipe Bulsoni (@fgbulsoni) + - Thiago Miotto (@tmiotto) + - Adriane Cardozo (@adriane-cardozo) attributes: - check_mode: - version_added: 3.3.0 - # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: - provider_display_name: - description: - - Provider Display Name. - type: str - params: - description: - - List of params to delimit, filter and sort the list of resources. - - "params allowed: - - V(start): The first item to return, using 0-based indexing. - - V(count): The number of resources to return. - - V(query): A general query string to narrow the list of resources returned. - - V(sort): The sort order of the returned data set." - type: dict + provider_display_name: + description: + - Provider Display Name. + type: str + params: + description: + - List of params to delimit, filter and sort the list of resources. + - 'Params allowed:' + - 'V(start): The first item to return, using 0-based indexing.' + - 'V(count): The number of resources to return.' + - 'V(query): A general query string to narrow the list of resources returned.' + - 'V(sort): The sort order of the returned data set.' + type: dict extends_documentation_fragment: - community.general.oneview - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Gather information about all SAN Managers community.general.oneview_san_manager_info: config: /etc/oneview/oneview_config.json @@ -80,14 +78,14 @@ EXAMPLES = ''' - name: Print fetched information about SAN Manager found by provider display name ansible.builtin.debug: msg: "{{ result.san_managers }}" -''' +""" -RETURN = ''' +RETURN = r""" san_managers: - description: Has all the OneView information about the SAN Managers. - returned: Always, but can be null. - type: dict -''' + description: Has all the OneView information about the SAN Managers. + returned: Always, but can be null. + type: dict +""" from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase diff --git a/plugins/modules/online_server_info.py b/plugins/modules/online_server_info.py index f6d03cb275..e36c78ef0e 100644 --- a/plugins/modules/online_server_info.py +++ b/plugins/modules/online_server_info.py @@ -8,23 +8,21 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = r''' ---- +DOCUMENTATION = r""" module: online_server_info short_description: Gather information about Online servers description: - Gather information about the servers. - - U(https://www.online.net/en/dedicated-server) + - U(https://www.online.net/en/dedicated-server). author: - "Remy Leone (@remyleone)" extends_documentation_fragment: - community.general.online - community.general.attributes - community.general.attributes.info_module +""" -''' - -EXAMPLES = r''' +EXAMPLES = r""" - name: Gather Online server information community.general.online_server_info: api_token: '0d1627e8-bbf0-44c5-a46f-5c4d3aef033f' @@ -32,13 +30,13 @@ EXAMPLES = r''' - ansible.builtin.debug: msg: "{{ result.online_server_info }}" -''' +""" -RETURN = r''' +RETURN = r""" online_server_info: description: - Response from Online API. - - "For more details please refer to: U(https://console.online.net/en/api/)." + - 'For more details please refer to: U(https://console.online.net/en/api/).' returned: success type: list elements: dict @@ -130,7 +128,7 @@ online_server_info: "support": "Basic service level" } ] -''' +""" from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.online import ( diff --git a/plugins/modules/online_user_info.py b/plugins/modules/online_user_info.py index 1d91418caf..60e0763267 100644 --- a/plugins/modules/online_user_info.py +++ b/plugins/modules/online_user_info.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -DOCUMENTATION = r''' +DOCUMENTATION = r""" module: online_user_info short_description: Gather information about Online user description: @@ -18,22 +18,22 @@ extends_documentation_fragment: - community.general.online - community.general.attributes - community.general.attributes.info_module -''' +""" -EXAMPLES = r''' +EXAMPLES = r""" - name: Gather Online user info community.general.online_user_info: register: result - ansible.builtin.debug: msg: "{{ result.online_user_info }}" -''' +""" -RETURN = r''' +RETURN = r""" online_user_info: description: - Response from Online API. - - "For more details please refer to: U(https://console.online.net/en/api/)." + - 'For more details please refer to: U(https://console.online.net/en/api/).' returned: success type: dict sample: @@ -45,7 +45,7 @@ online_user_info: "last_name": "bar", "login": "foobar" } -''' +""" from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.online import ( diff --git a/plugins/modules/open_iscsi.py b/plugins/modules/open_iscsi.py index df8a694a7e..15e20a241a 100644 --- a/plugins/modules/open_iscsi.py +++ b/plugins/modules/open_iscsi.py @@ -8,103 +8,99 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = r''' ---- +DOCUMENTATION = r""" module: open_iscsi author: - - Serge van Ginderachter (@srvg) + - Serge van Ginderachter (@srvg) short_description: Manage iSCSI targets with Open-iSCSI description: - - Discover targets on given portal, (dis)connect targets, mark targets to - manually or auto start, return device nodes of connected targets. + - Discover targets on given portal, (dis)connect targets, mark targets to manually or auto start, return device nodes of connected targets. requirements: - - open_iscsi library and tools (iscsiadm) + - open_iscsi library and tools (iscsiadm) extends_documentation_fragment: - - community.general.attributes + - community.general.attributes attributes: - check_mode: - support: full - diff_mode: - support: none + check_mode: + support: full + diff_mode: + support: none options: - portal: - description: - - The domain name or IP address of the iSCSI target. - type: str - aliases: [ ip ] - port: - description: - - The port on which the iSCSI target process listens. - type: str - default: '3260' - target: - description: - - The iSCSI target name. - type: str - aliases: [ name, targetname ] - login: - description: - - Whether the target node should be connected. - - When O(target) is omitted, will login to all available. - type: bool - aliases: [ state ] - node_auth: - description: - - The value for C(node.session.auth.authmethod). - type: str - default: CHAP - node_user: - description: - - The value for C(node.session.auth.username). - type: str - node_pass: - description: - - The value for C(node.session.auth.password). - type: str - node_user_in: - description: - - The value for C(node.session.auth.username_in). - type: str - version_added: 3.8.0 - node_pass_in: - description: - - The value for C(node.session.auth.password_in). - type: str - version_added: 3.8.0 - auto_node_startup: - description: - - Whether the target node should be automatically connected at startup. - type: bool - aliases: [ automatic ] - auto_portal_startup: - description: - - Whether the target node portal should be automatically connected at startup. - type: bool - version_added: 3.2.0 - discover: - description: - - Whether the list of target nodes on the portal should be - (re)discovered and added to the persistent iSCSI database. - - Keep in mind that C(iscsiadm) discovery resets configuration, like C(node.startup) - to manual, hence combined with O(auto_node_startup=true) will always return - a changed state. - type: bool - default: false - show_nodes: - description: - - Whether the list of nodes in the persistent iSCSI database should be returned by the module. - type: bool - default: false - rescan: - description: - - Rescan an established session for discovering new targets. - - When O(target) is omitted, will rescan all sessions. - type: bool - default: false - version_added: 4.1.0 -''' + portal: + description: + - The domain name or IP address of the iSCSI target. + type: str + aliases: [ip] + port: + description: + - The port on which the iSCSI target process listens. + type: str + default: '3260' + target: + description: + - The iSCSI target name. + type: str + aliases: [name, targetname] + login: + description: + - Whether the target node should be connected. + - When O(target) is omitted, will login to all available. + type: bool + aliases: [state] + node_auth: + description: + - The value for C(node.session.auth.authmethod). + type: str + default: CHAP + node_user: + description: + - The value for C(node.session.auth.username). + type: str + node_pass: + description: + - The value for C(node.session.auth.password). + type: str + node_user_in: + description: + - The value for C(node.session.auth.username_in). + type: str + version_added: 3.8.0 + node_pass_in: + description: + - The value for C(node.session.auth.password_in). + type: str + version_added: 3.8.0 + auto_node_startup: + description: + - Whether the target node should be automatically connected at startup. + type: bool + aliases: [automatic] + auto_portal_startup: + description: + - Whether the target node portal should be automatically connected at startup. + type: bool + version_added: 3.2.0 + discover: + description: + - Whether the list of target nodes on the portal should be (re)discovered and added to the persistent iSCSI database. + - Keep in mind that C(iscsiadm) discovery resets configuration, like C(node.startup) to manual, hence combined with O(auto_node_startup=true) + will always return a changed state. + type: bool + default: false + show_nodes: + description: + - Whether the list of nodes in the persistent iSCSI database should be returned by the module. + type: bool + default: false + rescan: + description: + - Rescan an established session for discovering new targets. + - When O(target) is omitted, will rescan all sessions. + type: bool + default: false + version_added: 4.1.0 +""" -EXAMPLES = r''' +EXAMPLES = r""" - name: Perform a discovery on sun.com and show available target nodes community.general.open_iscsi: show_nodes: true @@ -144,7 +140,7 @@ EXAMPLES = r''' community.general.open_iscsi: rescan: true target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d -''' +""" import glob import os diff --git a/plugins/modules/openbsd_pkg.py b/plugins/modules/openbsd_pkg.py index 69ac7bff8e..394a5b75e2 100644 --- a/plugins/modules/openbsd_pkg.py +++ b/plugins/modules/openbsd_pkg.py @@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: openbsd_pkg author: - Patrik Lundin (@eest) @@ -21,69 +20,64 @@ description: extends_documentation_fragment: - community.general.attributes attributes: - check_mode: - support: full - diff_mode: - support: partial - version_added: 9.1.0 - details: - - Only works when check mode is not enabled. + check_mode: + support: full + diff_mode: + support: partial + version_added: 9.1.0 + details: + - Only works when check mode is not enabled. options: - name: - description: - - A name or a list of names of the packages. - required: true - type: list - elements: str - state: - description: - - V(present) will make sure the package is installed. - - V(latest) will make sure the latest version of the package is installed. - - V(absent) will make sure the specified package is not installed. - choices: [ absent, latest, present, installed, removed ] - default: present - type: str - build: - description: - - Build the package from source instead of downloading and installing - a binary. Requires that the port source tree is already installed. - Automatically builds and installs the 'sqlports' package, if it is - not already installed. - - Mutually exclusive with O(snapshot). - type: bool - default: false - snapshot: - description: - - Force C(%c) and C(%m) to expand to C(snapshots), even on a release kernel. - - Mutually exclusive with O(build). - type: bool - default: false - version_added: 1.3.0 - ports_dir: - description: - - When used in combination with the O(build) option, allows overriding - the default ports source directory. - default: /usr/ports - type: path - clean: - description: - - When updating or removing packages, delete the extra configuration - file(s) in the old packages which are annotated with @extra in - the packaging-list. - type: bool - default: false - quick: - description: - - Replace or delete packages quickly; do not bother with checksums - before removing normal files. - type: bool - default: false + name: + description: + - A name or a list of names of the packages. + required: true + type: list + elements: str + state: + description: + - V(present) will make sure the package is installed. + - V(latest) will make sure the latest version of the package is installed. + - V(absent) will make sure the specified package is not installed. + choices: [absent, latest, present, installed, removed] + default: present + type: str + build: + description: + - Build the package from source instead of downloading and installing a binary. Requires that the port source tree is already installed. + Automatically builds and installs the C(sqlports) package, if it is not already installed. + - Mutually exclusive with O(snapshot). + type: bool + default: false + snapshot: + description: + - Force C(%c) and C(%m) to expand to C(snapshots), even on a release kernel. + - Mutually exclusive with O(build). + type: bool + default: false + version_added: 1.3.0 + ports_dir: + description: + - When used in combination with the O(build) option, allows overriding the default ports source directory. + default: /usr/ports + type: path + clean: + description: + - When updating or removing packages, delete the extra configuration file(s) in the old packages which are annotated with @extra in the + packaging-list. + type: bool + default: false + quick: + description: + - Replace or delete packages quickly; do not bother with checksums before removing normal files. + type: bool + default: false notes: - - When used with a C(loop:) each package will be processed individually, - it is much more efficient to pass the list directly to the O(name) option. -''' + - When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the O(name) + option. +""" -EXAMPLES = ''' +EXAMPLES = r""" - name: Make sure nmap is installed community.general.openbsd_pkg: name: nmap @@ -136,7 +130,7 @@ EXAMPLES = ''' name: qt5 quick: true state: absent -''' +""" import os import platform diff --git a/plugins/modules/opendj_backendprop.py b/plugins/modules/opendj_backendprop.py index fed53532d9..7b48587faf 100644 --- a/plugins/modules/opendj_backendprop.py +++ b/plugins/modules/opendj_backendprop.py @@ -8,94 +8,93 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: opendj_backendprop -short_description: Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command +short_description: Will update the backend configuration of OpenDJ using the dsconfig set-backend-prop command description: - - This module will update settings for OpenDJ with the command set-backend-prop. - - It will check first via de get-backend-prop if configuration needs to be applied. + - This module will update settings for OpenDJ with the command set-backend-prop. + - It will check first using de get-backend-prop if configuration needs to be applied. author: - - Werner Dijkerman (@dj-wasabi) + - Werner Dijkerman (@dj-wasabi) extends_documentation_fragment: - - community.general.attributes + - community.general.attributes attributes: - check_mode: - support: full - diff_mode: - support: none + check_mode: + support: full + diff_mode: + support: none options: - opendj_bindir: - description: - - The path to the bin directory of OpenDJ. - required: false - default: /opt/opendj/bin - type: path - hostname: - description: - - The hostname of the OpenDJ server. - required: true - type: str - port: - description: - - The Admin port on which the OpenDJ instance is available. - required: true - type: str - username: - description: - - The username to connect to. - required: false - default: cn=Directory Manager - type: str - password: - description: - - The password for the cn=Directory Manager user. - - Either password or passwordfile is needed. - required: false - type: str - passwordfile: - description: - - Location to the password file which holds the password for the cn=Directory Manager user. - - Either password or passwordfile is needed. - required: false - type: path - backend: - description: - - The name of the backend on which the property needs to be updated. - required: true - type: str - name: - description: - - The configuration setting to update. - required: true - type: str - value: - description: - - The value for the configuration item. - required: true - type: str - state: - description: - - If configuration needs to be added/updated - required: false - default: "present" - type: str -''' + opendj_bindir: + description: + - The path to the bin directory of OpenDJ. + required: false + default: /opt/opendj/bin + type: path + hostname: + description: + - The hostname of the OpenDJ server. + required: true + type: str + port: + description: + - The Admin port on which the OpenDJ instance is available. + required: true + type: str + username: + description: + - The username to connect to. + required: false + default: cn=Directory Manager + type: str + password: + description: + - The password for the C(cn=Directory Manager) user. + - Either password or passwordfile is needed. + required: false + type: str + passwordfile: + description: + - Location to the password file which holds the password for the C(cn=Directory Manager) user. + - Either password or passwordfile is needed. + required: false + type: path + backend: + description: + - The name of the backend on which the property needs to be updated. + required: true + type: str + name: + description: + - The configuration setting to update. + required: true + type: str + value: + description: + - The value for the configuration item. + required: true + type: str + state: + description: + - If configuration needs to be added/updated. + required: false + default: "present" + type: str +""" -EXAMPLES = ''' +EXAMPLES = """ - name: Add or update OpenDJ backend properties - action: opendj_backendprop - hostname=localhost - port=4444 - username="cn=Directory Manager" - password=password - backend=userRoot - name=index-entry-limit - value=5000 -''' + opendj_backendprop: + hostname: localhost + port: 4444 + username: "cn=Directory Manager" + password: password + backend: userRoot + name: index-entry-limit + value: 5000 +""" -RETURN = ''' -''' +RETURN = r""" +""" from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/openwrt_init.py b/plugins/modules/openwrt_init.py index 46fdea5e27..aa708f08f8 100644 --- a/plugins/modules/openwrt_init.py +++ b/plugins/modules/openwrt_init.py @@ -8,52 +8,50 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r""" module: openwrt_init author: - - "Andrew Gaffney (@agaffney)" + - "Andrew Gaffney (@agaffney)" short_description: Manage services on OpenWrt description: - - Controls OpenWrt services on remote hosts. + - Controls OpenWrt services on remote hosts. extends_documentation_fragment: - - community.general.attributes + - community.general.attributes attributes: - check_mode: - support: full - diff_mode: - support: none + check_mode: + support: full + diff_mode: + support: none options: - name: - type: str - description: - - Name of the service. - required: true - aliases: ['service'] - state: - type: str - description: - - V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. - - V(restarted) will always bounce the service. - - V(reloaded) will always reload. - choices: [ 'started', 'stopped', 'restarted', 'reloaded' ] - enabled: - description: - - Whether the service should start on boot. B(At least one of state and enabled are required.) - type: bool - pattern: - type: str - description: - - If the service does not respond to the 'running' command, name a - substring to look for as would be found in the output of the C(ps) - command as a stand-in for a 'running' result. If the string is found, - the service will be assumed to be running. + name: + type: str + description: + - Name of the service. + required: true + aliases: ['service'] + state: + type: str + description: + - V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. + - V(restarted) will always bounce the service. + - V(reloaded) will always reload. + choices: ['started', 'stopped', 'restarted', 'reloaded'] + enabled: + description: + - Whether the service should start on boot. B(At least one of state and enabled are required). + type: bool + pattern: + type: str + description: + - If the service does not respond to the 'running' command, name a substring to look for as would be found in the output of the C(ps) command + as a stand-in for a 'running' result. If the string is found, the service will be assumed to be running. notes: - - One option other than name is required. + - One option other than O(name) is required. requirements: - - An OpenWrt system (with python) -''' + - An OpenWrt system (with python) +""" -EXAMPLES = ''' +EXAMPLES = r""" - name: Start service httpd, if not running community.general.openwrt_init: state: started @@ -73,10 +71,10 @@ EXAMPLES = ''' community.general.openwrt_init: name: httpd enabled: true -''' +""" -RETURN = ''' -''' +RETURN = r""" +""" import os from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index 32cb2753f5..40c48f3800 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -11,71 +11,68 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: opkg author: "Patrick Pelletier (@skinp)" short_description: Package manager for OpenWrt and Openembedded/Yocto based Linux distributions description: - - Manages ipk packages for OpenWrt and Openembedded/Yocto based Linux distributions + - Manages ipk packages for OpenWrt and Openembedded/Yocto based Linux distributions. extends_documentation_fragment: - - community.general.attributes + - community.general.attributes attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - name: - description: - - Name of package(s) to install/remove. - - C(NAME=VERSION) syntax is also supported to install a package - in a certain version. See the examples. This only works on Yocto based - Linux distributions (opkg>=0.3.2) and not for OpenWrt. This is - supported since community.general 6.2.0. - aliases: [pkg] - required: true - type: list - elements: str - state: - description: - - State of the package. - choices: [ 'present', 'absent', 'installed', 'removed' ] - default: present - type: str - force: - description: - - The C(opkg --force) parameter used. - - State V("") is deprecated and will be removed in community.general 12.0.0. Please omit the parameter O(force) to obtain the same behavior. - choices: - - "" - - "depends" - - "maintainer" - - "reinstall" - - "overwrite" - - "downgrade" - - "space" - - "postinstall" - - "remove" - - "checksum" - - "removal-of-dependent-packages" - type: str - update_cache: - description: - - Update the package DB first. - default: false - type: bool - executable: - description: - - The executable location for C(opkg). - type: path - version_added: 7.2.0 + name: + description: + - Name of package(s) to install/remove. + - C(NAME=VERSION) syntax is also supported to install a package in a certain version. See the examples. This only works on Yocto based Linux + distributions (opkg>=0.3.2) and not for OpenWrt. This is supported since community.general 6.2.0. + aliases: [pkg] + required: true + type: list + elements: str + state: + description: + - State of the package. + choices: ['present', 'absent', 'installed', 'removed'] + default: present + type: str + force: + description: + - The C(opkg --force) parameter used. + - State V("") is deprecated and will be removed in community.general 12.0.0. Please omit the parameter O(force) to obtain the same behavior. + choices: + - "" + - "depends" + - "maintainer" + - "reinstall" + - "overwrite" + - "downgrade" + - "space" + - "postinstall" + - "remove" + - "checksum" + - "removal-of-dependent-packages" + type: str + update_cache: + description: + - Update the package DB first. + default: false + type: bool + executable: + description: + - The executable location for C(opkg). + type: path + version_added: 7.2.0 requirements: - - opkg - - python -''' + - opkg + - python +""" -EXAMPLES = ''' +EXAMPLES = r""" - name: Install foo community.general.opkg: name: foo @@ -109,9 +106,9 @@ EXAMPLES = ''' name: foo state: present force: overwrite -''' +""" -RETURN = """ +RETURN = r""" version: description: Version of opkg. type: str diff --git a/plugins/modules/osx_defaults.py b/plugins/modules/osx_defaults.py index db5d889a37..1cc541377c 100644 --- a/plugins/modules/osx_defaults.py +++ b/plugins/modules/osx_defaults.py @@ -10,18 +10,16 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = r''' ---- +DOCUMENTATION = r""" module: osx_defaults author: # DO NOT RE-ADD GITHUB HANDLE! -- Franck Nijhof (!UNKNOWN) + - Franck Nijhof (!UNKNOWN) short_description: Manage macOS user defaults description: - - osx_defaults allows users to read, write, and delete macOS user defaults from Ansible scripts. - - macOS applications and other programs use the defaults system to record user preferences and other - information that must be maintained when the applications are not running (such as default font for new - documents, or the position of an Info panel). + - This module allows users to read, write, and delete macOS user defaults from Ansible scripts. + - MacOS applications and other programs use the defaults system to record user preferences and other information that must be maintained when + the applications are not running (such as default font for new documents, or the position of an Info panel). extends_documentation_fragment: - community.general.attributes attributes: @@ -48,7 +46,7 @@ options: description: - The type of value to write. type: str - choices: [ array, bool, boolean, date, float, int, integer, string ] + choices: [array, bool, boolean, date, float, int, integer, string] default: string check_type: description: @@ -72,7 +70,7 @@ options: - The state of the user defaults. - If set to V(list) will query the given parameter specified by O(key). Returns V(null) is nothing found or mis-spelled. type: str - choices: [ absent, list, present ] + choices: [absent, list, present] default: present path: description: @@ -80,10 +78,10 @@ options: type: str default: /usr/bin:/usr/local/bin notes: - - Apple Mac caches defaults. You may need to logout and login to apply the changes. -''' + - Apple Mac caches defaults. You may need to logout and login to apply the changes. +""" -EXAMPLES = r''' +EXAMPLES = r""" - name: Set boolean valued key for application domain community.general.osx_defaults: domain: com.apple.Safari @@ -135,7 +133,7 @@ EXAMPLES = r''' domain: com.geekchimp.macable key: ExampleKeyToRemove state: absent -''' +""" from datetime import datetime import re diff --git a/plugins/modules/ovh_ip_failover.py b/plugins/modules/ovh_ip_failover.py index 58d340e3e9..d69c176fbd 100644 --- a/plugins/modules/ovh_ip_failover.py +++ b/plugins/modules/ovh_ip_failover.py @@ -9,88 +9,79 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: ovh_ip_failover short_description: Manage OVH IP failover address description: - - Manage OVH (French European hosting provider) IP Failover Address. For now, this module can only be used to move - an ip failover (or failover block) between services + - Manage OVH (French European hosting provider) IP Failover Address. For now, this module can only be used to move an IP failover (or failover + block) between services. author: "Pascal HERAUD (@pascalheraud)" notes: - - Uses the python OVH Api U(https://github.com/ovh/python-ovh). - You have to create an application (a key and secret) with a consumer - key as described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/) + - Uses the python OVH API U(https://github.com/ovh/python-ovh). You have to create an application (a key and secret) with a consumer key as + described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/). requirements: - - ovh >= 0.4.8 + - ovh >= 0.4.8 extends_documentation_fragment: - - community.general.attributes + - community.general.attributes attributes: - check_mode: - support: full - diff_mode: - support: none + check_mode: + support: full + diff_mode: + support: none options: - name: - required: true - description: - - The IP address to manage (can be a single IP like 1.1.1.1 - or a block like 1.1.1.1/28 ) - type: str - service: - required: true - description: - - The name of the OVH service this IP address should be routed - type: str - endpoint: - required: true - description: - - The endpoint to use ( for instance ovh-eu) - type: str - wait_completion: - required: false - default: true - type: bool - description: - - If true, the module will wait for the IP address to be moved. - If false, exit without waiting. The taskId will be returned - in module output - wait_task_completion: - required: false - default: 0 - description: - - If not 0, the module will wait for this task id to be - completed. Use wait_task_completion if you want to wait for - completion of a previously executed task with - wait_completion=false. You can execute this module repeatedly on - a list of failover IPs using wait_completion=false (see examples) - type: int - application_key: - required: true - description: - - The applicationKey to use - type: str - application_secret: - required: true - description: - - The application secret to use - type: str - consumer_key: - required: true - description: - - The consumer key to use - type: str - timeout: - required: false - default: 120 - description: - - The timeout in seconds used to wait for a task to be - completed. Default is 120 seconds. - type: int + name: + required: true + description: + - The IP address to manage (can be a single IP like V(1.1.1.1) or a block like V(1.1.1.1/28)). + type: str + service: + required: true + description: + - The name of the OVH service this IP address should be routed. + type: str + endpoint: + required: true + description: + - The endpoint to use (for instance V(ovh-eu)). + type: str + wait_completion: + required: false + default: true + type: bool + description: + - If true, the module will wait for the IP address to be moved. If false, exit without waiting. The taskId will be returned in module output. + wait_task_completion: + required: false + default: 0 + description: + - If not 0, the module will wait for this task id to be completed. Use O(wait_task_completion) if you want to wait for completion of a previously + executed task with O(wait_completion=false). You can execute this module repeatedly on a list of failover IPs using O(wait_completion=false) + (see examples). + type: int + application_key: + required: true + description: + - The applicationKey to use. + type: str + application_secret: + required: true + description: + - The application secret to use. + type: str + consumer_key: + required: true + description: + - The consumer key to use. + type: str + timeout: + required: false + default: 120 + description: + - The timeout in seconds used to wait for a task to be completed. Default is 120 seconds. + type: int +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" # Route an IP address 1.1.1.1 to the service ns666.ovh.net - community.general.ovh_ip_failover: name: 1.1.1.1 @@ -116,10 +107,10 @@ EXAMPLES = ''' application_key: yourkey application_secret: yoursecret consumer_key: yourconsumerkey -''' +""" -RETURN = ''' -''' +RETURN = r""" +""" import time diff --git a/plugins/modules/ovh_ip_loadbalancing_backend.py b/plugins/modules/ovh_ip_loadbalancing_backend.py index f70b5804a7..0f0ad2f09e 100644 --- a/plugins/modules/ovh_ip_loadbalancing_backend.py +++ b/plugins/modules/ovh_ip_loadbalancing_backend.py @@ -9,85 +9,80 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: ovh_ip_loadbalancing_backend short_description: Manage OVH IP LoadBalancing backends description: - - Manage OVH (French European hosting provider) LoadBalancing IP backends + - Manage OVH (French European hosting provider) LoadBalancing IP backends. author: Pascal Heraud (@pascalheraud) notes: - - Uses the python OVH Api U(https://github.com/ovh/python-ovh). - You have to create an application (a key and secret) with a consumer - key as described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/) + - Uses the python OVH Api U(https://github.com/ovh/python-ovh). You have to create an application (a key and secret) with a consumer key as + described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/). requirements: - - ovh > 0.3.5 + - ovh > 0.3.5 extends_documentation_fragment: - - community.general.attributes + - community.general.attributes attributes: - check_mode: - support: none - diff_mode: - support: none + check_mode: + support: none + diff_mode: + support: none options: - name: - required: true - description: - - Name of the LoadBalancing internal name (ip-X.X.X.X) - type: str - backend: - required: true - description: - - The IP address of the backend to update / modify / delete - type: str - state: - default: present - choices: ['present', 'absent'] - description: - - Determines whether the backend is to be created/modified - or deleted - type: str - probe: - default: 'none' - choices: ['none', 'http', 'icmp' , 'oco'] - description: - - Determines the type of probe to use for this backend - type: str - weight: - default: 8 - description: - - Determines the weight for this backend - type: int - endpoint: - required: true - description: - - The endpoint to use ( for instance ovh-eu) - type: str - application_key: - required: true - description: - - The applicationKey to use - type: str - application_secret: - required: true - description: - - The application secret to use - type: str - consumer_key: - required: true - description: - - The consumer key to use - type: str - timeout: - default: 120 - description: - - The timeout in seconds used to wait for a task to be - completed. - type: int + name: + required: true + description: + - Name of the LoadBalancing internal name (ip-X.X.X.X). + type: str + backend: + required: true + description: + - The IP address of the backend to update / modify / delete. + type: str + state: + default: present + choices: ['present', 'absent'] + description: + - Determines whether the backend is to be created/modified or deleted. + type: str + probe: + default: 'none' + choices: ['none', 'http', 'icmp', 'oco'] + description: + - Determines the type of probe to use for this backend. + type: str + weight: + default: 8 + description: + - Determines the weight for this backend. + type: int + endpoint: + required: true + description: + - The endpoint to use ( for instance ovh-eu). + type: str + application_key: + required: true + description: + - The applicationKey to use. + type: str + application_secret: + required: true + description: + - The application secret to use. + type: str + consumer_key: + required: true + description: + - The consumer key to use. + type: str + timeout: + default: 120 + description: + - The timeout in seconds used to wait for a task to be completed. + type: int +""" -''' - -EXAMPLES = ''' +EXAMPLES = r""" - name: Adds or modify the backend '212.1.1.1' to a loadbalancing 'ip-1.1.1.1' ovh_ip_loadbalancing: name: ip-1.1.1.1 @@ -109,10 +104,10 @@ EXAMPLES = ''' application_key: yourkey application_secret: yoursecret consumer_key: yourconsumerkey -''' +""" -RETURN = ''' -''' +RETURN = r""" +""" import time diff --git a/plugins/modules/ovh_monthly_billing.py b/plugins/modules/ovh_monthly_billing.py index c2f503e3ad..438bf7db7f 100644 --- a/plugins/modules/ovh_monthly_billing.py +++ b/plugins/modules/ovh_monthly_billing.py @@ -9,52 +9,51 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -DOCUMENTATION = ''' ---- +DOCUMENTATION = r""" module: ovh_monthly_billing author: Francois Lallart (@fraff) version_added: '0.2.0' short_description: Manage OVH monthly billing description: - - Enable monthly billing on OVH cloud instances (be aware OVH does not allow to disable it). -requirements: [ "ovh" ] + - Enable monthly billing on OVH cloud instances (be aware OVH does not allow to disable it). +requirements: ["ovh"] extends_documentation_fragment: - - community.general.attributes + - community.general.attributes attributes: - check_mode: - support: full - diff_mode: - support: none + check_mode: + support: full + diff_mode: + support: none options: - project_id: - required: true - type: str - description: - - ID of the project, get it with U(https://api.ovh.com/console/#/cloud/project#GET) - instance_id: - required: true - type: str - description: - - ID of the instance, get it with U(https://api.ovh.com/console/#/cloud/project/%7BserviceName%7D/instance#GET) - endpoint: - type: str - description: - - The endpoint to use (for instance ovh-eu) - application_key: - type: str - description: - - The applicationKey to use - application_secret: - type: str - description: - - The application secret to use - consumer_key: - type: str - description: - - The consumer key to use -''' + project_id: + required: true + type: str + description: + - ID of the project, get it with U(https://api.ovh.com/console/#/cloud/project#GET). + instance_id: + required: true + type: str + description: + - ID of the instance, get it with U(https://api.ovh.com/console/#/cloud/project/%7BserviceName%7D/instance#GET). + endpoint: + type: str + description: + - The endpoint to use (for instance V(ovh-eu)). + application_key: + type: str + description: + - The applicationKey to use. + application_secret: + type: str + description: + - The application secret to use. + consumer_key: + type: str + description: + - The consumer key to use. +""" -EXAMPLES = ''' +EXAMPLES = r""" - name: Basic usage, using auth from /etc/ovh.conf community.general.ovh_monthly_billing: project_id: 0c727a20aa144485b70c44dee9123b46 @@ -75,10 +74,10 @@ EXAMPLES = ''' application_key: yourkey application_secret: yoursecret consumer_key: yourconsumerkey -''' +""" -RETURN = ''' -''' +RETURN = r""" +""" import traceback