[onev ... ovh]*.py: normalize docs (#9373)

* [onev ... ovh]*.py: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/9101/merge
Alexei Znamensky 2024-12-26 10:48:15 +13:00 committed by GitHub
parent 13e2097f37
commit d96e56048f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 956 additions and 1021 deletions

View File

@ -7,8 +7,7 @@
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:
@ -31,7 +30,7 @@ options:
type: str
options:
description:
- "Retrieve additional information. Options available: 'visualContent'."
- "Retrieve additional information. Options available: V(visualContent)."
type: list
elements: str
@ -40,10 +39,9 @@ extends_documentation_fragment:
- 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,9 +105,9 @@ 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.
@ -119,7 +117,7 @@ datacenter_visual_content:
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

View File

@ -8,8 +8,7 @@
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:
@ -31,9 +30,8 @@ options:
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."
- '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
@ -42,10 +40,9 @@ extends_documentation_fragment:
- 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
@ -125,8 +122,7 @@ 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:
@ -152,9 +148,9 @@ 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.
@ -174,7 +170,7 @@ enclosure_utilization:
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

View File

@ -7,8 +7,7 @@
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:
@ -43,10 +42,9 @@ extends_documentation_fragment:
- 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'
@ -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.
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.
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.
returned: On O(state=default_bandwidth_reset). Can be null.
type: dict
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound

View File

@ -7,8 +7,7 @@
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:
@ -30,8 +29,8 @@ options:
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)."
- '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:
@ -39,10 +38,9 @@ extends_documentation_fragment:
- 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,9 +94,9 @@ 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.
@ -113,7 +111,7 @@ 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
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -7,8 +7,7 @@
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:
@ -25,8 +24,8 @@ 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.
- 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
@ -40,10 +39,9 @@ extends_documentation_fragment:
- 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.
returned: On O(state=present). Can be null.
type: dict
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -7,8 +7,7 @@
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:
@ -34,10 +33,9 @@ extends_documentation_fragment:
- 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
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -7,8 +7,7 @@
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:
@ -26,8 +25,8 @@ 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.
- 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']
@ -41,10 +40,9 @@ extends_documentation_fragment:
- 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.
returned: On O(state=present). Can be null.
type: dict
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -7,8 +7,7 @@
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:
@ -33,10 +32,9 @@ extends_documentation_fragment:
- 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
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -8,8 +8,7 @@
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:
@ -29,8 +28,8 @@ 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.
- 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
@ -43,10 +42,9 @@ extends_documentation_fragment:
- 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,7 +55,7 @@ EXAMPLES = '''
enclosureType: C7000
interconnectMapTemplate:
interconnectMapEntryTemplates:
- logicalDownlinkUri: ~
- logicalDownlinkUri:
logicalLocation:
locationEntries:
- relativeValue: 1
@ -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.
returned: On O(state=present). Can be null.
type: dict
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound

View File

@ -8,12 +8,11 @@
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
author:
@ -34,10 +33,9 @@ extends_documentation_fragment:
- 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
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -7,8 +7,7 @@
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:
@ -43,10 +42,9 @@ extends_documentation_fragment:
- 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
@ -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.
returned: On O(state=present), but can be null.
type: dict
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound

View File

@ -7,8 +7,7 @@
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:
@ -31,9 +30,8 @@ options:
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."
- '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
@ -42,10 +40,9 @@ extends_documentation_fragment:
- 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
@ -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
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -7,8 +7,7 @@
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:
@ -30,7 +29,8 @@ options:
- 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.
- 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]
@ -44,10 +44,9 @@ extends_documentation_fragment:
- 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.
returned: On O(state=present). Can be null.
type: dict
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleValueError

View File

@ -7,12 +7,11 @@
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
author:
@ -31,20 +30,19 @@ options:
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."
- '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
'''
"""
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase

View File

@ -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 (

View File

@ -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 (

View File

@ -8,15 +8,13 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: open_iscsi
author:
- 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)
extends_documentation_fragment:
@ -31,7 +29,7 @@ options:
description:
- The domain name or IP address of the iSCSI target.
type: str
aliases: [ ip ]
aliases: [ip]
port:
description:
- The port on which the iSCSI target process listens.
@ -41,13 +39,13 @@ options:
description:
- The iSCSI target name.
type: str
aliases: [ name, targetname ]
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 ]
aliases: [state]
node_auth:
description:
- The value for C(node.session.auth.authmethod).
@ -75,7 +73,7 @@ options:
description:
- Whether the target node should be automatically connected at startup.
type: bool
aliases: [ automatic ]
aliases: [automatic]
auto_portal_startup:
description:
- Whether the target node portal should be automatically connected at startup.
@ -83,11 +81,9 @@ options:
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.
- 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:
@ -102,9 +98,9 @@ options:
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

View File

@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: openbsd_pkg
author:
- Patrik Lundin (@eest)
@ -40,15 +39,13 @@ options:
- 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 ]
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.
- 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
@ -61,29 +58,26 @@ options:
version_added: 1.3.0
ports_dir:
description:
- When used in combination with the O(build) option, allows overriding
the default ports source directory.
- 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.
- 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.
- 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

View File

@ -8,13 +8,12 @@
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.
- It will check first using de get-backend-prop if configuration needs to be applied.
author:
- Werner Dijkerman (@dj-wasabi)
extends_documentation_fragment:
@ -49,13 +48,13 @@ options:
type: str
password:
description:
- The password for the cn=Directory Manager user.
- 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 cn=Directory Manager user.
- 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
@ -76,26 +75,26 @@ options:
type: str
state:
description:
- If configuration needs to be added/updated
- 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

View File

@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r"""
module: openwrt_init
author:
- "Andrew Gaffney (@agaffney)"
@ -35,25 +35,23 @@ options:
- 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' ]
choices: ['started', 'stopped', 'restarted', 'reloaded']
enabled:
description:
- Whether the service should start on boot. B(At least one of state and enabled are required.)
- 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.
- 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)
'''
"""
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

View File

@ -11,13 +11,12 @@ 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
attributes:
@ -29,10 +28,8 @@ 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.
- 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
@ -40,7 +37,7 @@ options:
state:
description:
- State of the package.
choices: [ 'present', 'absent', 'installed', 'removed' ]
choices: ['present', 'absent', 'installed', 'removed']
default: present
type: str
force:
@ -73,9 +70,9 @@ options:
requirements:
- 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

View File

@ -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:
@ -81,9 +79,9 @@ options:
default: /usr/bin:/usr/local/bin
notes:
- 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

View File

@ -9,18 +9,16 @@ 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
extends_documentation_fragment:
@ -34,63 +32,56 @@ 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 )
- 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
- 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)
- 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
- 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)
- 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
- The applicationKey to use.
type: str
application_secret:
required: true
description:
- The application secret to use
- The application secret to use.
type: str
consumer_key:
required: true
description:
- The consumer key to use
- 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.
- 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

View File

@ -9,17 +9,15 @@ 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
extends_documentation_fragment:
@ -33,61 +31,58 @@ options:
name:
required: true
description:
- Name of the LoadBalancing internal name (ip-X.X.X.X)
- 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
- 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
- Determines whether the backend is to be created/modified or deleted.
type: str
probe:
default: 'none'
choices: ['none', 'http', 'icmp' , 'oco']
choices: ['none', 'http', 'icmp', 'oco']
description:
- Determines the type of probe to use for this backend
- Determines the type of probe to use for this backend.
type: str
weight:
default: 8
description:
- Determines the weight for this backend
- Determines the weight for this backend.
type: int
endpoint:
required: true
description:
- The endpoint to use ( for instance ovh-eu)
- The endpoint to use ( for instance ovh-eu).
type: str
application_key:
required: true
description:
- The applicationKey to use
- The applicationKey to use.
type: str
application_secret:
required: true
description:
- The application secret to use
- The application secret to use.
type: str
consumer_key:
required: true
description:
- The consumer key to use
- The consumer key to use.
type: str
timeout:
default: 120
description:
- The timeout in seconds used to wait for a task to be
completed.
- 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

View File

@ -9,15 +9,14 @@ 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" ]
requirements: ["ovh"]
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -30,31 +29,31 @@ options:
required: true
type: str
description:
- ID of the project, get it with U(https://api.ovh.com/console/#/cloud/project#GET)
- 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)
- 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)
- The endpoint to use (for instance V(ovh-eu)).
application_key:
type: str
description:
- The applicationKey to use
- The applicationKey to use.
application_secret:
type: str
description:
- The application secret to use
- The application secret to use.
consumer_key:
type: str
description:
- The consumer key to use
'''
- 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