[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
parent
13e2097f37
commit
d96e56048f
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_datacenter_info
|
module: oneview_datacenter_info
|
||||||
short_description: Retrieve information about the OneView Data Centers
|
short_description: Retrieve information about the OneView Data Centers
|
||||||
description:
|
description:
|
||||||
|
@ -31,7 +30,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
- "Retrieve additional information. Options available: 'visualContent'."
|
- "Retrieve additional information. Options available: V(visualContent)."
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
|
|
||||||
|
@ -40,10 +39,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all Data Centers
|
- name: Gather information about all Data Centers
|
||||||
community.general.oneview_datacenter_info:
|
community.general.oneview_datacenter_info:
|
||||||
hostname: 172.16.101.48
|
hostname: 172.16.101.48
|
||||||
|
@ -107,9 +105,9 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about Data Center Visual Content
|
- name: Print fetched information about Data Center Visual Content
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.datacenter_visual_content }}"
|
msg: "{{ result.datacenter_visual_content }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
datacenters:
|
datacenters:
|
||||||
description: Has all the OneView information about the Data Centers.
|
description: Has all the OneView information about the Data Centers.
|
||||||
returned: Always, but can be null.
|
returned: Always, but can be null.
|
||||||
|
@ -119,7 +117,7 @@ datacenter_visual_content:
|
||||||
description: Has information about the Data Center Visual Content.
|
description: Has information about the Data Center Visual Content.
|
||||||
returned: When requested, but can be null.
|
returned: When requested, but can be null.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_enclosure_info
|
module: oneview_enclosure_info
|
||||||
short_description: Retrieve information about one or more Enclosures
|
short_description: Retrieve information about one or more Enclosures
|
||||||
description:
|
description:
|
||||||
|
@ -31,9 +30,8 @@ options:
|
||||||
type: str
|
type: str
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
- "List with options to gather additional information about an Enclosure and related resources.
|
- 'List with options to gather additional information about an Enclosure and related resources. Options allowed: V(script), V(environmentalConfiguration),
|
||||||
Options allowed: V(script), V(environmentalConfiguration), and V(utilization). For the option V(utilization),
|
and V(utilization). For the option V(utilization), you can provide specific parameters.'
|
||||||
you can provide specific parameters."
|
|
||||||
type: list
|
type: list
|
||||||
elements: raw
|
elements: raw
|
||||||
|
|
||||||
|
@ -42,10 +40,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all Enclosures
|
- name: Gather information about all Enclosures
|
||||||
community.general.oneview_enclosure_info:
|
community.general.oneview_enclosure_info:
|
||||||
hostname: 172.16.101.48
|
hostname: 172.16.101.48
|
||||||
|
@ -125,8 +122,7 @@ EXAMPLES = '''
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.enclosure_utilization }}"
|
msg: "{{ result.enclosure_utilization }}"
|
||||||
|
|
||||||
- name: "Gather information about an Enclosure with temperature data at a resolution of one sample per day, between two
|
- name: "Gather information about an Enclosure with temperature data at a resolution of one sample per day, between two specified dates"
|
||||||
specified dates"
|
|
||||||
community.general.oneview_enclosure_info:
|
community.general.oneview_enclosure_info:
|
||||||
name: Test-Enclosure
|
name: Test-Enclosure
|
||||||
options:
|
options:
|
||||||
|
@ -152,9 +148,9 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about Enclosure Utilization
|
- name: Print fetched information about Enclosure Utilization
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.enclosure_utilization }}"
|
msg: "{{ result.enclosure_utilization }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
enclosures:
|
enclosures:
|
||||||
description: Has all the OneView information about the Enclosures.
|
description: Has all the OneView information about the Enclosures.
|
||||||
returned: Always, but can be null.
|
returned: Always, but can be null.
|
||||||
|
@ -174,7 +170,7 @@ enclosure_utilization:
|
||||||
description: Has all the OneView information about the utilization of an Enclosure.
|
description: Has all the OneView information about the utilization of an Enclosure.
|
||||||
returned: When requested, but can be null.
|
returned: When requested, but can be null.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_ethernet_network
|
module: oneview_ethernet_network
|
||||||
short_description: Manage OneView Ethernet Network resources
|
short_description: Manage OneView Ethernet Network resources
|
||||||
description:
|
description:
|
||||||
|
@ -43,10 +42,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.validateetag
|
- community.general.oneview.validateetag
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Ensure that the Ethernet Network is present using the default configuration
|
- name: Ensure that the Ethernet Network is present using the default configuration
|
||||||
community.general.oneview_ethernet_network:
|
community.general.oneview_ethernet_network:
|
||||||
config: '/etc/oneview/oneview_config.json'
|
config: '/etc/oneview/oneview_config.json'
|
||||||
|
@ -107,24 +105,24 @@ EXAMPLES = '''
|
||||||
data:
|
data:
|
||||||
name: 'Test Ethernet Network'
|
name: 'Test Ethernet Network'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
ethernet_network:
|
ethernet_network:
|
||||||
description: Has the facts about the Ethernet Networks.
|
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
|
type: dict
|
||||||
|
|
||||||
ethernet_network_bulk:
|
ethernet_network_bulk:
|
||||||
description: Has the facts about the Ethernet Networks affected by the bulk insert.
|
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
|
type: dict
|
||||||
|
|
||||||
ethernet_network_connection_template:
|
ethernet_network_connection_template:
|
||||||
description: Has the facts about the 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
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_ethernet_network_info
|
module: oneview_ethernet_network_info
|
||||||
short_description: Retrieve the information about one or more of the OneView Ethernet Networks
|
short_description: Retrieve the information about one or more of the OneView Ethernet Networks
|
||||||
description:
|
description:
|
||||||
|
@ -30,8 +29,8 @@ options:
|
||||||
type: str
|
type: str
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
- "List with options to gather additional information about an Ethernet Network and related resources.
|
- 'List with options to gather additional information about an Ethernet Network and related resources. Options allowed: V(associatedProfiles)
|
||||||
Options allowed: V(associatedProfiles) and V(associatedUplinkGroups)."
|
and V(associatedUplinkGroups).'
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -39,10 +38,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all Ethernet Networks
|
- name: Gather information about all Ethernet Networks
|
||||||
community.general.oneview_ethernet_network_info:
|
community.general.oneview_ethernet_network_info:
|
||||||
config: /etc/oneview/oneview_config.json
|
config: /etc/oneview/oneview_config.json
|
||||||
|
@ -96,9 +94,9 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about Ethernet Network Associated Uplink Groups
|
- name: Print fetched information about Ethernet Network Associated Uplink Groups
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.enet_associated_uplink_groups }}"
|
msg: "{{ result.enet_associated_uplink_groups }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
ethernet_networks:
|
ethernet_networks:
|
||||||
description: Has all the OneView information about the Ethernet Networks.
|
description: Has all the OneView information about the Ethernet Networks.
|
||||||
returned: Always, but can be null.
|
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.
|
description: Has all the OneView information about the uplink sets which are using the Ethernet network.
|
||||||
returned: When requested, but can be null.
|
returned: When requested, but can be null.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_fc_network
|
module: oneview_fc_network
|
||||||
short_description: Manage OneView Fibre Channel Network resources
|
short_description: Manage OneView Fibre Channel Network resources
|
||||||
description:
|
description:
|
||||||
|
@ -25,8 +24,8 @@ options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Indicates the desired state for the Fibre Channel Network resource.
|
- Indicates the desired state for the Fibre Channel Network resource.
|
||||||
V(present) will ensure data properties are compliant with OneView.
|
- V(present) will ensure data properties are compliant with OneView.
|
||||||
V(absent) will remove the resource from OneView, if it exists.
|
- V(absent) will remove the resource from OneView, if it exists.
|
||||||
type: str
|
type: str
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
required: true
|
required: true
|
||||||
|
@ -40,10 +39,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.validateetag
|
- community.general.oneview.validateetag
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Ensure that the Fibre Channel Network is present using the default configuration
|
- name: Ensure that the Fibre Channel Network is present using the default configuration
|
||||||
community.general.oneview_fc_network:
|
community.general.oneview_fc_network:
|
||||||
config: "{{ config_file_path }}"
|
config: "{{ config_file_path }}"
|
||||||
|
@ -75,14 +73,14 @@ EXAMPLES = '''
|
||||||
state: absent
|
state: absent
|
||||||
data:
|
data:
|
||||||
name: 'New FC Network'
|
name: 'New FC Network'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
fc_network:
|
fc_network:
|
||||||
description: Has the facts about the managed OneView 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
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_fc_network_info
|
module: oneview_fc_network_info
|
||||||
short_description: Retrieve the information about one or more of the OneView Fibre Channel Networks
|
short_description: Retrieve the information about one or more of the OneView Fibre Channel Networks
|
||||||
description:
|
description:
|
||||||
|
@ -34,10 +33,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all Fibre Channel Networks
|
- name: Gather information about all Fibre Channel Networks
|
||||||
community.general.oneview_fc_network_info:
|
community.general.oneview_fc_network_info:
|
||||||
config: /etc/oneview/oneview_config.json
|
config: /etc/oneview/oneview_config.json
|
||||||
|
@ -73,14 +71,14 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about Fibre Channel Network found by name
|
- name: Print fetched information about Fibre Channel Network found by name
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.fc_networks }}"
|
msg: "{{ result.fc_networks }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
fc_networks:
|
fc_networks:
|
||||||
description: Has all the OneView information about the Fibre Channel Networks.
|
description: Has all the OneView information about the Fibre Channel Networks.
|
||||||
returned: Always, but can be null.
|
returned: Always, but can be null.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_fcoe_network
|
module: oneview_fcoe_network
|
||||||
short_description: Manage OneView FCoE Network resources
|
short_description: Manage OneView FCoE Network resources
|
||||||
description:
|
description:
|
||||||
|
@ -26,8 +25,8 @@ options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Indicates the desired state for the FCoE Network resource.
|
- Indicates the desired state for the FCoE Network resource.
|
||||||
V(present) will ensure data properties are compliant with OneView.
|
- V(present) will ensure data properties are compliant with OneView.
|
||||||
V(absent) will remove the resource from OneView, if it exists.
|
- V(absent) will remove the resource from OneView, if it exists.
|
||||||
type: str
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
|
@ -41,10 +40,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.validateetag
|
- community.general.oneview.validateetag
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Ensure that FCoE Network is present using the default configuration
|
- name: Ensure that FCoE Network is present using the default configuration
|
||||||
community.general.oneview_fcoe_network:
|
community.general.oneview_fcoe_network:
|
||||||
config: '/etc/oneview/oneview_config.json'
|
config: '/etc/oneview/oneview_config.json'
|
||||||
|
@ -72,14 +70,14 @@ EXAMPLES = '''
|
||||||
data:
|
data:
|
||||||
name: New FCoE Network
|
name: New FCoE Network
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
fcoe_network:
|
fcoe_network:
|
||||||
description: Has the facts about the OneView FCoE Networks.
|
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
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_fcoe_network_info
|
module: oneview_fcoe_network_info
|
||||||
short_description: Retrieve the information about one or more of the OneView FCoE Networks
|
short_description: Retrieve the information about one or more of the OneView FCoE Networks
|
||||||
description:
|
description:
|
||||||
|
@ -33,10 +32,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all FCoE Networks
|
- name: Gather information about all FCoE Networks
|
||||||
community.general.oneview_fcoe_network_info:
|
community.general.oneview_fcoe_network_info:
|
||||||
config: /etc/oneview/oneview_config.json
|
config: /etc/oneview/oneview_config.json
|
||||||
|
@ -72,14 +70,14 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about FCoE Network found by name
|
- name: Print fetched information about FCoE Network found by name
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.fcoe_networks }}"
|
msg: "{{ result.fcoe_networks }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
fcoe_networks:
|
fcoe_networks:
|
||||||
description: Has all the OneView information about the FCoE Networks.
|
description: Has all the OneView information about the FCoE Networks.
|
||||||
returned: Always, but can be null.
|
returned: Always, but can be null.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_logical_interconnect_group
|
module: oneview_logical_interconnect_group
|
||||||
short_description: Manage OneView Logical Interconnect Group resources
|
short_description: Manage OneView Logical Interconnect Group resources
|
||||||
description:
|
description:
|
||||||
|
@ -29,8 +28,8 @@ options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Indicates the desired state for the Logical Interconnect Group resource.
|
- Indicates the desired state for the Logical Interconnect Group resource.
|
||||||
V(absent) will remove the resource from OneView, if it exists.
|
- V(absent) will remove the resource from OneView, if it exists.
|
||||||
V(present) will ensure data properties are compliant with OneView.
|
- V(present) will ensure data properties are compliant with OneView.
|
||||||
type: str
|
type: str
|
||||||
choices: [absent, present]
|
choices: [absent, present]
|
||||||
default: present
|
default: present
|
||||||
|
@ -43,10 +42,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.validateetag
|
- community.general.oneview.validateetag
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Ensure that the Logical Interconnect Group is present
|
- name: Ensure that the Logical Interconnect Group is present
|
||||||
community.general.oneview_logical_interconnect_group:
|
community.general.oneview_logical_interconnect_group:
|
||||||
config: /etc/oneview/oneview_config.json
|
config: /etc/oneview/oneview_config.json
|
||||||
|
@ -57,7 +55,7 @@ EXAMPLES = '''
|
||||||
enclosureType: C7000
|
enclosureType: C7000
|
||||||
interconnectMapTemplate:
|
interconnectMapTemplate:
|
||||||
interconnectMapEntryTemplates:
|
interconnectMapEntryTemplates:
|
||||||
- logicalDownlinkUri: ~
|
- logicalDownlinkUri:
|
||||||
logicalLocation:
|
logicalLocation:
|
||||||
locationEntries:
|
locationEntries:
|
||||||
- relativeValue: 1
|
- relativeValue: 1
|
||||||
|
@ -95,14 +93,14 @@ EXAMPLES = '''
|
||||||
data:
|
data:
|
||||||
name: New Logical Interconnect Group
|
name: New Logical Interconnect Group
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
logical_interconnect_group:
|
logical_interconnect_group:
|
||||||
description: Has the facts about the OneView 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
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,11 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_logical_interconnect_group_info
|
module: oneview_logical_interconnect_group_info
|
||||||
short_description: Retrieve information about one or more of the OneView Logical Interconnect Groups
|
short_description: Retrieve information about one or more of the OneView Logical Interconnect Groups
|
||||||
description:
|
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:
|
requirements:
|
||||||
- hpOneView >= 2.0.1
|
- hpOneView >= 2.0.1
|
||||||
author:
|
author:
|
||||||
|
@ -34,10 +33,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all Logical Interconnect Groups
|
- name: Gather information about all Logical Interconnect Groups
|
||||||
community.general.oneview_logical_interconnect_group_info:
|
community.general.oneview_logical_interconnect_group_info:
|
||||||
hostname: 172.16.101.48
|
hostname: 172.16.101.48
|
||||||
|
@ -85,14 +83,14 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about Logical Interconnect Group found by name
|
- name: Print fetched information about Logical Interconnect Group found by name
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.logical_interconnect_groups }}"
|
msg: "{{ result.logical_interconnect_groups }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
logical_interconnect_groups:
|
logical_interconnect_groups:
|
||||||
description: Has all the OneView information about the Logical Interconnect Groups.
|
description: Has all the OneView information about the Logical Interconnect Groups.
|
||||||
returned: Always, but can be null.
|
returned: Always, but can be null.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_network_set
|
module: oneview_network_set
|
||||||
short_description: Manage HPE OneView Network Set resources
|
short_description: Manage HPE OneView Network Set resources
|
||||||
description:
|
description:
|
||||||
|
@ -43,10 +42,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.validateetag
|
- community.general.oneview.validateetag
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Create a Network Set
|
- name: Create a Network Set
|
||||||
community.general.oneview_network_set:
|
community.general.oneview_network_set:
|
||||||
config: /etc/oneview/oneview_config.json
|
config: /etc/oneview/oneview_config.json
|
||||||
|
@ -87,14 +85,14 @@ EXAMPLES = '''
|
||||||
- /rest/scopes/01SC123456
|
- /rest/scopes/01SC123456
|
||||||
- /rest/scopes/02SC123456
|
- /rest/scopes/02SC123456
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
network_set:
|
network_set:
|
||||||
description: Has the facts about the 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
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleResourceNotFound
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_network_set_info
|
module: oneview_network_set_info
|
||||||
short_description: Retrieve information about the OneView Network Sets
|
short_description: Retrieve information about the OneView Network Sets
|
||||||
description:
|
description:
|
||||||
|
@ -31,9 +30,8 @@ options:
|
||||||
|
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
- "List with options to gather information about Network Set.
|
- 'List with options to gather information about Network Set. Option allowed: V(withoutEthernet). The option V(withoutEthernet) retrieves
|
||||||
Option allowed: V(withoutEthernet).
|
the list of network_sets excluding Ethernet networks.'
|
||||||
The option V(withoutEthernet) retrieves the list of network_sets excluding Ethernet networks."
|
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
|
|
||||||
|
@ -42,10 +40,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all Network Sets
|
- name: Gather information about all Network Sets
|
||||||
community.general.oneview_network_set_info:
|
community.general.oneview_network_set_info:
|
||||||
hostname: 172.16.101.48
|
hostname: 172.16.101.48
|
||||||
|
@ -126,14 +123,14 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about Network Set found by name, excluding Ethernet networks
|
- name: Print fetched information about Network Set found by name, excluding Ethernet networks
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.network_sets }}"
|
msg: "{{ result.network_sets }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
network_sets:
|
network_sets:
|
||||||
description: Has all the OneView information about the Network Sets.
|
description: Has all the OneView information about the Network Sets.
|
||||||
returned: Always, but can be empty.
|
returned: Always, but can be empty.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_san_manager
|
module: oneview_san_manager
|
||||||
short_description: Manage OneView SAN Manager resources
|
short_description: Manage OneView SAN Manager resources
|
||||||
description:
|
description:
|
||||||
|
@ -30,7 +29,8 @@ options:
|
||||||
- Indicates the desired state for the Uplink Set resource.
|
- Indicates the desired state for the Uplink Set resource.
|
||||||
- V(present) ensures data properties are compliant with OneView.
|
- V(present) ensures data properties are compliant with OneView.
|
||||||
- V(absent) removes the resource from OneView, if it exists.
|
- 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
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: [present, absent, connection_information_set]
|
choices: [present, absent, connection_information_set]
|
||||||
|
@ -44,10 +44,9 @@ extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.validateetag
|
- community.general.oneview.validateetag
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Creates a Device Manager for the Brocade SAN provider with the given hostname and credentials
|
- name: Creates a Device Manager for the Brocade SAN provider with the given hostname and credentials
|
||||||
community.general.oneview_san_manager:
|
community.general.oneview_san_manager:
|
||||||
config: /etc/oneview/oneview_config.json
|
config: /etc/oneview/oneview_config.json
|
||||||
|
@ -123,14 +122,14 @@ EXAMPLES = '''
|
||||||
data:
|
data:
|
||||||
name: '172.18.15.1'
|
name: '172.18.15.1'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
san_manager:
|
san_manager:
|
||||||
description: Has the OneView facts about the 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
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleValueError
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase, OneViewModuleValueError
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,11 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: oneview_san_manager_info
|
module: oneview_san_manager_info
|
||||||
short_description: Retrieve information about one or more of the OneView SAN Managers
|
short_description: Retrieve information about one or more of the OneView SAN Managers
|
||||||
description:
|
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:
|
requirements:
|
||||||
- hpOneView >= 2.0.1
|
- hpOneView >= 2.0.1
|
||||||
author:
|
author:
|
||||||
|
@ -31,20 +30,19 @@ options:
|
||||||
params:
|
params:
|
||||||
description:
|
description:
|
||||||
- List of params to delimit, filter and sort the list of resources.
|
- List of params to delimit, filter and sort the list of resources.
|
||||||
- "params allowed:
|
- 'Params allowed:'
|
||||||
- V(start): The first item to return, using 0-based indexing.
|
- 'V(start): The first item to return, using 0-based indexing.'
|
||||||
- V(count): The number of resources to return.
|
- 'V(count): The number of resources to return.'
|
||||||
- V(query): A general query string to narrow the list of resources returned.
|
- 'V(query): A general query string to narrow the list of resources returned.'
|
||||||
- V(sort): The sort order of the returned data set."
|
- 'V(sort): The sort order of the returned data set.'
|
||||||
type: dict
|
type: dict
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Gather information about all SAN Managers
|
- name: Gather information about all SAN Managers
|
||||||
community.general.oneview_san_manager_info:
|
community.general.oneview_san_manager_info:
|
||||||
config: /etc/oneview/oneview_config.json
|
config: /etc/oneview/oneview_config.json
|
||||||
|
@ -80,14 +78,14 @@ EXAMPLES = '''
|
||||||
- name: Print fetched information about SAN Manager found by provider display name
|
- name: Print fetched information about SAN Manager found by provider display name
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result.san_managers }}"
|
msg: "{{ result.san_managers }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
san_managers:
|
san_managers:
|
||||||
description: Has all the OneView information about the SAN Managers.
|
description: Has all the OneView information about the SAN Managers.
|
||||||
returned: Always, but can be null.
|
returned: Always, but can be null.
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
from ansible_collections.community.general.plugins.module_utils.oneview import OneViewModuleBase
|
||||||
|
|
||||||
|
|
|
@ -8,23 +8,21 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: online_server_info
|
module: online_server_info
|
||||||
short_description: Gather information about Online servers
|
short_description: Gather information about Online servers
|
||||||
description:
|
description:
|
||||||
- Gather information about the servers.
|
- Gather information about the servers.
|
||||||
- U(https://www.online.net/en/dedicated-server)
|
- U(https://www.online.net/en/dedicated-server).
|
||||||
author:
|
author:
|
||||||
- "Remy Leone (@remyleone)"
|
- "Remy Leone (@remyleone)"
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.online
|
- community.general.online
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
|
||||||
- name: Gather Online server information
|
- name: Gather Online server information
|
||||||
community.general.online_server_info:
|
community.general.online_server_info:
|
||||||
api_token: '0d1627e8-bbf0-44c5-a46f-5c4d3aef033f'
|
api_token: '0d1627e8-bbf0-44c5-a46f-5c4d3aef033f'
|
||||||
|
@ -32,13 +30,13 @@ EXAMPLES = r'''
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
msg: "{{ result.online_server_info }}"
|
msg: "{{ result.online_server_info }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
online_server_info:
|
online_server_info:
|
||||||
description:
|
description:
|
||||||
- Response from Online API.
|
- 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
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
|
@ -130,7 +128,7 @@ online_server_info:
|
||||||
"support": "Basic service level"
|
"support": "Basic service level"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.online import (
|
from ansible_collections.community.general.plugins.module_utils.online import (
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
module: online_user_info
|
module: online_user_info
|
||||||
short_description: Gather information about Online user
|
short_description: Gather information about Online user
|
||||||
description:
|
description:
|
||||||
|
@ -18,22 +18,22 @@ extends_documentation_fragment:
|
||||||
- community.general.online
|
- community.general.online
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Gather Online user info
|
- name: Gather Online user info
|
||||||
community.general.online_user_info:
|
community.general.online_user_info:
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
msg: "{{ result.online_user_info }}"
|
msg: "{{ result.online_user_info }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
online_user_info:
|
online_user_info:
|
||||||
description:
|
description:
|
||||||
- Response from Online API.
|
- 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
|
returned: success
|
||||||
type: dict
|
type: dict
|
||||||
sample:
|
sample:
|
||||||
|
@ -45,7 +45,7 @@ online_user_info:
|
||||||
"last_name": "bar",
|
"last_name": "bar",
|
||||||
"login": "foobar"
|
"login": "foobar"
|
||||||
}
|
}
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.online import (
|
from ansible_collections.community.general.plugins.module_utils.online import (
|
||||||
|
|
|
@ -8,15 +8,13 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: open_iscsi
|
module: open_iscsi
|
||||||
author:
|
author:
|
||||||
- Serge van Ginderachter (@srvg)
|
- Serge van Ginderachter (@srvg)
|
||||||
short_description: Manage iSCSI targets with Open-iSCSI
|
short_description: Manage iSCSI targets with Open-iSCSI
|
||||||
description:
|
description:
|
||||||
- Discover targets on given portal, (dis)connect targets, mark targets to
|
- Discover targets on given portal, (dis)connect targets, mark targets to manually or auto start, return device nodes of connected targets.
|
||||||
manually or auto start, return device nodes of connected targets.
|
|
||||||
requirements:
|
requirements:
|
||||||
- open_iscsi library and tools (iscsiadm)
|
- open_iscsi library and tools (iscsiadm)
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -31,7 +29,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- The domain name or IP address of the iSCSI target.
|
- The domain name or IP address of the iSCSI target.
|
||||||
type: str
|
type: str
|
||||||
aliases: [ ip ]
|
aliases: [ip]
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- The port on which the iSCSI target process listens.
|
- The port on which the iSCSI target process listens.
|
||||||
|
@ -41,13 +39,13 @@ options:
|
||||||
description:
|
description:
|
||||||
- The iSCSI target name.
|
- The iSCSI target name.
|
||||||
type: str
|
type: str
|
||||||
aliases: [ name, targetname ]
|
aliases: [name, targetname]
|
||||||
login:
|
login:
|
||||||
description:
|
description:
|
||||||
- Whether the target node should be connected.
|
- Whether the target node should be connected.
|
||||||
- When O(target) is omitted, will login to all available.
|
- When O(target) is omitted, will login to all available.
|
||||||
type: bool
|
type: bool
|
||||||
aliases: [ state ]
|
aliases: [state]
|
||||||
node_auth:
|
node_auth:
|
||||||
description:
|
description:
|
||||||
- The value for C(node.session.auth.authmethod).
|
- The value for C(node.session.auth.authmethod).
|
||||||
|
@ -75,7 +73,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- Whether the target node should be automatically connected at startup.
|
- Whether the target node should be automatically connected at startup.
|
||||||
type: bool
|
type: bool
|
||||||
aliases: [ automatic ]
|
aliases: [automatic]
|
||||||
auto_portal_startup:
|
auto_portal_startup:
|
||||||
description:
|
description:
|
||||||
- Whether the target node portal should be automatically connected at startup.
|
- Whether the target node portal should be automatically connected at startup.
|
||||||
|
@ -83,11 +81,9 @@ options:
|
||||||
version_added: 3.2.0
|
version_added: 3.2.0
|
||||||
discover:
|
discover:
|
||||||
description:
|
description:
|
||||||
- Whether the list of target nodes on the portal should be
|
- Whether the list of target nodes on the portal should be (re)discovered and added to the persistent iSCSI database.
|
||||||
(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)
|
||||||
- Keep in mind that C(iscsiadm) discovery resets configuration, like C(node.startup)
|
will always return a changed state.
|
||||||
to manual, hence combined with O(auto_node_startup=true) will always return
|
|
||||||
a changed state.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
show_nodes:
|
show_nodes:
|
||||||
|
@ -102,9 +98,9 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
version_added: 4.1.0
|
version_added: 4.1.0
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Perform a discovery on sun.com and show available target nodes
|
- name: Perform a discovery on sun.com and show available target nodes
|
||||||
community.general.open_iscsi:
|
community.general.open_iscsi:
|
||||||
show_nodes: true
|
show_nodes: true
|
||||||
|
@ -144,7 +140,7 @@ EXAMPLES = r'''
|
||||||
community.general.open_iscsi:
|
community.general.open_iscsi:
|
||||||
rescan: true
|
rescan: true
|
||||||
target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d
|
target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: openbsd_pkg
|
module: openbsd_pkg
|
||||||
author:
|
author:
|
||||||
- Patrik Lundin (@eest)
|
- Patrik Lundin (@eest)
|
||||||
|
@ -40,15 +39,13 @@ options:
|
||||||
- V(present) will make sure the package is installed.
|
- V(present) will make sure the package is installed.
|
||||||
- V(latest) will make sure the latest version of 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.
|
- 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
|
default: present
|
||||||
type: str
|
type: str
|
||||||
build:
|
build:
|
||||||
description:
|
description:
|
||||||
- Build the package from source instead of downloading and installing
|
- Build the package from source instead of downloading and installing a binary. Requires that the port source tree is already installed.
|
||||||
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.
|
||||||
Automatically builds and installs the 'sqlports' package, if it is
|
|
||||||
not already installed.
|
|
||||||
- Mutually exclusive with O(snapshot).
|
- Mutually exclusive with O(snapshot).
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
|
@ -61,29 +58,26 @@ options:
|
||||||
version_added: 1.3.0
|
version_added: 1.3.0
|
||||||
ports_dir:
|
ports_dir:
|
||||||
description:
|
description:
|
||||||
- When used in combination with the O(build) option, allows overriding
|
- When used in combination with the O(build) option, allows overriding the default ports source directory.
|
||||||
the default ports source directory.
|
|
||||||
default: /usr/ports
|
default: /usr/ports
|
||||||
type: path
|
type: path
|
||||||
clean:
|
clean:
|
||||||
description:
|
description:
|
||||||
- When updating or removing packages, delete the extra configuration
|
- When updating or removing packages, delete the extra configuration file(s) in the old packages which are annotated with @extra in the
|
||||||
file(s) in the old packages which are annotated with @extra in
|
packaging-list.
|
||||||
the packaging-list.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
quick:
|
quick:
|
||||||
description:
|
description:
|
||||||
- Replace or delete packages quickly; do not bother with checksums
|
- Replace or delete packages quickly; do not bother with checksums before removing normal files.
|
||||||
before removing normal files.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
notes:
|
notes:
|
||||||
- When used with a C(loop:) each package will be processed individually,
|
- 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)
|
||||||
it is much more efficient to pass the list directly to the O(name) option.
|
option.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Make sure nmap is installed
|
- name: Make sure nmap is installed
|
||||||
community.general.openbsd_pkg:
|
community.general.openbsd_pkg:
|
||||||
name: nmap
|
name: nmap
|
||||||
|
@ -136,7 +130,7 @@ EXAMPLES = '''
|
||||||
name: qt5
|
name: qt5
|
||||||
quick: true
|
quick: true
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
|
|
@ -8,13 +8,12 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: opendj_backendprop
|
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:
|
description:
|
||||||
- This module will update settings for OpenDJ with the command set-backend-prop.
|
- 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:
|
author:
|
||||||
- Werner Dijkerman (@dj-wasabi)
|
- Werner Dijkerman (@dj-wasabi)
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -49,13 +48,13 @@ options:
|
||||||
type: str
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- The password for the cn=Directory Manager user.
|
- The password for the C(cn=Directory Manager) user.
|
||||||
- Either password or passwordfile is needed.
|
- Either password or passwordfile is needed.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
passwordfile:
|
passwordfile:
|
||||||
description:
|
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.
|
- Either password or passwordfile is needed.
|
||||||
required: false
|
required: false
|
||||||
type: path
|
type: path
|
||||||
|
@ -76,26 +75,26 @@ options:
|
||||||
type: str
|
type: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- If configuration needs to be added/updated
|
- If configuration needs to be added/updated.
|
||||||
required: false
|
required: false
|
||||||
default: "present"
|
default: "present"
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = """
|
||||||
- name: Add or update OpenDJ backend properties
|
- name: Add or update OpenDJ backend properties
|
||||||
action: opendj_backendprop
|
opendj_backendprop:
|
||||||
hostname=localhost
|
hostname: localhost
|
||||||
port=4444
|
port: 4444
|
||||||
username="cn=Directory Manager"
|
username: "cn=Directory Manager"
|
||||||
password=password
|
password: password
|
||||||
backend=userRoot
|
backend: userRoot
|
||||||
name=index-entry-limit
|
name: index-entry-limit
|
||||||
value=5000
|
value: 5000
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
module: openwrt_init
|
module: openwrt_init
|
||||||
author:
|
author:
|
||||||
- "Andrew Gaffney (@agaffney)"
|
- "Andrew Gaffney (@agaffney)"
|
||||||
|
@ -35,25 +35,23 @@ options:
|
||||||
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
|
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
|
||||||
- V(restarted) will always bounce the service.
|
- V(restarted) will always bounce the service.
|
||||||
- V(reloaded) will always reload.
|
- V(reloaded) will always reload.
|
||||||
choices: [ 'started', 'stopped', 'restarted', 'reloaded' ]
|
choices: ['started', 'stopped', 'restarted', 'reloaded']
|
||||||
enabled:
|
enabled:
|
||||||
description:
|
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
|
type: bool
|
||||||
pattern:
|
pattern:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- If the service does not respond to the 'running' command, name a
|
- 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
|
||||||
substring to look for as would be found in the output of the C(ps)
|
as a stand-in for a 'running' result. If the string is found, the service will be assumed to be running.
|
||||||
command as a stand-in for a 'running' result. If the string is found,
|
|
||||||
the service will be assumed to be running.
|
|
||||||
notes:
|
notes:
|
||||||
- One option other than name is required.
|
- One option other than O(name) is required.
|
||||||
requirements:
|
requirements:
|
||||||
- An OpenWrt system (with python)
|
- An OpenWrt system (with python)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Start service httpd, if not running
|
- name: Start service httpd, if not running
|
||||||
community.general.openwrt_init:
|
community.general.openwrt_init:
|
||||||
state: started
|
state: started
|
||||||
|
@ -73,10 +71,10 @@ EXAMPLES = '''
|
||||||
community.general.openwrt_init:
|
community.general.openwrt_init:
|
||||||
name: httpd
|
name: httpd
|
||||||
enabled: true
|
enabled: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
|
@ -11,13 +11,12 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: opkg
|
module: opkg
|
||||||
author: "Patrick Pelletier (@skinp)"
|
author: "Patrick Pelletier (@skinp)"
|
||||||
short_description: Package manager for OpenWrt and Openembedded/Yocto based Linux distributions
|
short_description: Package manager for OpenWrt and Openembedded/Yocto based Linux distributions
|
||||||
description:
|
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:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -29,10 +28,8 @@ options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of package(s) to install/remove.
|
- Name of package(s) to install/remove.
|
||||||
- C(NAME=VERSION) syntax is also supported to install a package
|
- 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
|
||||||
in a certain version. See the examples. This only works on Yocto based
|
distributions (opkg>=0.3.2) and not for OpenWrt. This is supported since community.general 6.2.0.
|
||||||
Linux distributions (opkg>=0.3.2) and not for OpenWrt. This is
|
|
||||||
supported since community.general 6.2.0.
|
|
||||||
aliases: [pkg]
|
aliases: [pkg]
|
||||||
required: true
|
required: true
|
||||||
type: list
|
type: list
|
||||||
|
@ -40,7 +37,7 @@ options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the package.
|
- State of the package.
|
||||||
choices: [ 'present', 'absent', 'installed', 'removed' ]
|
choices: ['present', 'absent', 'installed', 'removed']
|
||||||
default: present
|
default: present
|
||||||
type: str
|
type: str
|
||||||
force:
|
force:
|
||||||
|
@ -73,9 +70,9 @@ options:
|
||||||
requirements:
|
requirements:
|
||||||
- opkg
|
- opkg
|
||||||
- python
|
- python
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Install foo
|
- name: Install foo
|
||||||
community.general.opkg:
|
community.general.opkg:
|
||||||
name: foo
|
name: foo
|
||||||
|
@ -109,9 +106,9 @@ EXAMPLES = '''
|
||||||
name: foo
|
name: foo
|
||||||
state: present
|
state: present
|
||||||
force: overwrite
|
force: overwrite
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = r"""
|
||||||
version:
|
version:
|
||||||
description: Version of opkg.
|
description: Version of opkg.
|
||||||
type: str
|
type: str
|
||||||
|
|
|
@ -10,18 +10,16 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: osx_defaults
|
module: osx_defaults
|
||||||
author:
|
author:
|
||||||
# DO NOT RE-ADD GITHUB HANDLE!
|
# DO NOT RE-ADD GITHUB HANDLE!
|
||||||
- Franck Nijhof (!UNKNOWN)
|
- Franck Nijhof (!UNKNOWN)
|
||||||
short_description: Manage macOS user defaults
|
short_description: Manage macOS user defaults
|
||||||
description:
|
description:
|
||||||
- osx_defaults allows users to read, write, and delete macOS user defaults from Ansible scripts.
|
- 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
|
- MacOS applications and other programs use the defaults system to record user preferences and other information that must be maintained when
|
||||||
information that must be maintained when the applications are not running (such as default font for new
|
the applications are not running (such as default font for new documents, or the position of an Info panel).
|
||||||
documents, or the position of an Info panel).
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -48,7 +46,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- The type of value to write.
|
- The type of value to write.
|
||||||
type: str
|
type: str
|
||||||
choices: [ array, bool, boolean, date, float, int, integer, string ]
|
choices: [array, bool, boolean, date, float, int, integer, string]
|
||||||
default: string
|
default: string
|
||||||
check_type:
|
check_type:
|
||||||
description:
|
description:
|
||||||
|
@ -72,7 +70,7 @@ options:
|
||||||
- The state of the user defaults.
|
- 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.
|
- 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
|
type: str
|
||||||
choices: [ absent, list, present ]
|
choices: [absent, list, present]
|
||||||
default: present
|
default: present
|
||||||
path:
|
path:
|
||||||
description:
|
description:
|
||||||
|
@ -81,9 +79,9 @@ options:
|
||||||
default: /usr/bin:/usr/local/bin
|
default: /usr/bin:/usr/local/bin
|
||||||
notes:
|
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
|
- name: Set boolean valued key for application domain
|
||||||
community.general.osx_defaults:
|
community.general.osx_defaults:
|
||||||
domain: com.apple.Safari
|
domain: com.apple.Safari
|
||||||
|
@ -135,7 +133,7 @@ EXAMPLES = r'''
|
||||||
domain: com.geekchimp.macable
|
domain: com.geekchimp.macable
|
||||||
key: ExampleKeyToRemove
|
key: ExampleKeyToRemove
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -9,18 +9,16 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: ovh_ip_failover
|
module: ovh_ip_failover
|
||||||
short_description: Manage OVH IP failover address
|
short_description: Manage OVH IP failover address
|
||||||
description:
|
description:
|
||||||
- Manage OVH (French European hosting provider) IP Failover Address. For now, this module can only be used to move
|
- Manage OVH (French European hosting provider) IP Failover Address. For now, this module can only be used to move an IP failover (or failover
|
||||||
an ip failover (or failover block) between services
|
block) between services.
|
||||||
author: "Pascal HERAUD (@pascalheraud)"
|
author: "Pascal HERAUD (@pascalheraud)"
|
||||||
notes:
|
notes:
|
||||||
- Uses the python OVH Api U(https://github.com/ovh/python-ovh).
|
- 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
|
||||||
You have to create an application (a key and secret) with a consumer
|
described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/).
|
||||||
key as described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/)
|
|
||||||
requirements:
|
requirements:
|
||||||
- ovh >= 0.4.8
|
- ovh >= 0.4.8
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -34,63 +32,56 @@ options:
|
||||||
name:
|
name:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The IP address to manage (can be a single IP like 1.1.1.1
|
- 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)).
|
||||||
or a block like 1.1.1.1/28 )
|
|
||||||
type: str
|
type: str
|
||||||
service:
|
service:
|
||||||
required: true
|
required: true
|
||||||
description:
|
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
|
type: str
|
||||||
endpoint:
|
endpoint:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The endpoint to use ( for instance ovh-eu)
|
- The endpoint to use (for instance V(ovh-eu)).
|
||||||
type: str
|
type: str
|
||||||
wait_completion:
|
wait_completion:
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: bool
|
type: bool
|
||||||
description:
|
description:
|
||||||
- If true, the module will wait for the IP address to be moved.
|
- 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 false, exit without waiting. The taskId will be returned
|
|
||||||
in module output
|
|
||||||
wait_task_completion:
|
wait_task_completion:
|
||||||
required: false
|
required: false
|
||||||
default: 0
|
default: 0
|
||||||
description:
|
description:
|
||||||
- If not 0, the module will wait for this task id to be
|
- 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
|
||||||
completed. Use wait_task_completion if you want to wait for
|
executed task with O(wait_completion=false). You can execute this module repeatedly on a list of failover IPs using O(wait_completion=false)
|
||||||
completion of a previously executed task with
|
(see examples).
|
||||||
wait_completion=false. You can execute this module repeatedly on
|
|
||||||
a list of failover IPs using wait_completion=false (see examples)
|
|
||||||
type: int
|
type: int
|
||||||
application_key:
|
application_key:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The applicationKey to use
|
- The applicationKey to use.
|
||||||
type: str
|
type: str
|
||||||
application_secret:
|
application_secret:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The application secret to use
|
- The application secret to use.
|
||||||
type: str
|
type: str
|
||||||
consumer_key:
|
consumer_key:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The consumer key to use
|
- The consumer key to use.
|
||||||
type: str
|
type: str
|
||||||
timeout:
|
timeout:
|
||||||
required: false
|
required: false
|
||||||
default: 120
|
default: 120
|
||||||
description:
|
description:
|
||||||
- The timeout in seconds used to wait for a task to be
|
- The timeout in seconds used to wait for a task to be completed. Default is 120 seconds.
|
||||||
completed. Default is 120 seconds.
|
|
||||||
type: int
|
type: int
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
# Route an IP address 1.1.1.1 to the service ns666.ovh.net
|
# Route an IP address 1.1.1.1 to the service ns666.ovh.net
|
||||||
- community.general.ovh_ip_failover:
|
- community.general.ovh_ip_failover:
|
||||||
name: 1.1.1.1
|
name: 1.1.1.1
|
||||||
|
@ -116,10 +107,10 @@ EXAMPLES = '''
|
||||||
application_key: yourkey
|
application_key: yourkey
|
||||||
application_secret: yoursecret
|
application_secret: yoursecret
|
||||||
consumer_key: yourconsumerkey
|
consumer_key: yourconsumerkey
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,15 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: ovh_ip_loadbalancing_backend
|
module: ovh_ip_loadbalancing_backend
|
||||||
short_description: Manage OVH IP LoadBalancing backends
|
short_description: Manage OVH IP LoadBalancing backends
|
||||||
description:
|
description:
|
||||||
- Manage OVH (French European hosting provider) LoadBalancing IP backends
|
- Manage OVH (French European hosting provider) LoadBalancing IP backends.
|
||||||
author: Pascal Heraud (@pascalheraud)
|
author: Pascal Heraud (@pascalheraud)
|
||||||
notes:
|
notes:
|
||||||
- Uses the python OVH Api U(https://github.com/ovh/python-ovh).
|
- 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
|
||||||
You have to create an application (a key and secret) with a consumer
|
described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/).
|
||||||
key as described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/)
|
|
||||||
requirements:
|
requirements:
|
||||||
- ovh > 0.3.5
|
- ovh > 0.3.5
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -33,61 +31,58 @@ options:
|
||||||
name:
|
name:
|
||||||
required: true
|
required: true
|
||||||
description:
|
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
|
type: str
|
||||||
backend:
|
backend:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The IP address of the backend to update / modify / delete
|
- The IP address of the backend to update / modify / delete.
|
||||||
type: str
|
type: str
|
||||||
state:
|
state:
|
||||||
default: present
|
default: present
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
description:
|
description:
|
||||||
- Determines whether the backend is to be created/modified
|
- Determines whether the backend is to be created/modified or deleted.
|
||||||
or deleted
|
|
||||||
type: str
|
type: str
|
||||||
probe:
|
probe:
|
||||||
default: 'none'
|
default: 'none'
|
||||||
choices: ['none', 'http', 'icmp' , 'oco']
|
choices: ['none', 'http', 'icmp', 'oco']
|
||||||
description:
|
description:
|
||||||
- Determines the type of probe to use for this backend
|
- Determines the type of probe to use for this backend.
|
||||||
type: str
|
type: str
|
||||||
weight:
|
weight:
|
||||||
default: 8
|
default: 8
|
||||||
description:
|
description:
|
||||||
- Determines the weight for this backend
|
- Determines the weight for this backend.
|
||||||
type: int
|
type: int
|
||||||
endpoint:
|
endpoint:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The endpoint to use ( for instance ovh-eu)
|
- The endpoint to use ( for instance ovh-eu).
|
||||||
type: str
|
type: str
|
||||||
application_key:
|
application_key:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The applicationKey to use
|
- The applicationKey to use.
|
||||||
type: str
|
type: str
|
||||||
application_secret:
|
application_secret:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The application secret to use
|
- The application secret to use.
|
||||||
type: str
|
type: str
|
||||||
consumer_key:
|
consumer_key:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The consumer key to use
|
- The consumer key to use.
|
||||||
type: str
|
type: str
|
||||||
timeout:
|
timeout:
|
||||||
default: 120
|
default: 120
|
||||||
description:
|
description:
|
||||||
- The timeout in seconds used to wait for a task to be
|
- The timeout in seconds used to wait for a task to be completed.
|
||||||
completed.
|
|
||||||
type: int
|
type: int
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Adds or modify the backend '212.1.1.1' to a loadbalancing 'ip-1.1.1.1'
|
- name: Adds or modify the backend '212.1.1.1' to a loadbalancing 'ip-1.1.1.1'
|
||||||
ovh_ip_loadbalancing:
|
ovh_ip_loadbalancing:
|
||||||
name: ip-1.1.1.1
|
name: ip-1.1.1.1
|
||||||
|
@ -109,10 +104,10 @@ EXAMPLES = '''
|
||||||
application_key: yourkey
|
application_key: yourkey
|
||||||
application_secret: yoursecret
|
application_secret: yoursecret
|
||||||
consumer_key: yourconsumerkey
|
consumer_key: yourconsumerkey
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,14 @@ from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: ovh_monthly_billing
|
module: ovh_monthly_billing
|
||||||
author: Francois Lallart (@fraff)
|
author: Francois Lallart (@fraff)
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
short_description: Manage OVH monthly billing
|
short_description: Manage OVH monthly billing
|
||||||
description:
|
description:
|
||||||
- Enable monthly billing on OVH cloud instances (be aware OVH does not allow to disable it).
|
- Enable monthly billing on OVH cloud instances (be aware OVH does not allow to disable it).
|
||||||
requirements: [ "ovh" ]
|
requirements: ["ovh"]
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -30,31 +29,31 @@ options:
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
description:
|
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:
|
instance_id:
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
description:
|
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:
|
endpoint:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The endpoint to use (for instance ovh-eu)
|
- The endpoint to use (for instance V(ovh-eu)).
|
||||||
application_key:
|
application_key:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The applicationKey to use
|
- The applicationKey to use.
|
||||||
application_secret:
|
application_secret:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The application secret to use
|
- The application secret to use.
|
||||||
consumer_key:
|
consumer_key:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The consumer key to use
|
- The consumer key to use.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Basic usage, using auth from /etc/ovh.conf
|
- name: Basic usage, using auth from /etc/ovh.conf
|
||||||
community.general.ovh_monthly_billing:
|
community.general.ovh_monthly_billing:
|
||||||
project_id: 0c727a20aa144485b70c44dee9123b46
|
project_id: 0c727a20aa144485b70c44dee9123b46
|
||||||
|
@ -75,10 +74,10 @@ EXAMPLES = '''
|
||||||
application_key: yourkey
|
application_key: yourkey
|
||||||
application_secret: yoursecret
|
application_secret: yoursecret
|
||||||
consumer_key: yourconsumerkey
|
consumer_key: yourconsumerkey
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue