[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,43 +7,41 @@
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:
- Retrieve information about the OneView Data Centers. - Retrieve information about the OneView Data Centers.
requirements: requirements:
- "hpOneView >= 2.0.1" - "hpOneView >= 2.0.1"
author: author:
- Alex Monteiro (@aalexmonteiro) - Alex Monteiro (@aalexmonteiro)
- Madhav Bharadwaj (@madhav-bharadwaj) - Madhav Bharadwaj (@madhav-bharadwaj)
- Priyanka Sood (@soodpr) - Priyanka Sood (@soodpr)
- Ricardo Galeno (@ricardogpsf) - Ricardo Galeno (@ricardogpsf)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
description: description:
- Data Center name. - Data Center name.
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
extends_documentation_fragment: extends_documentation_fragment:
- community.general.oneview - community.general.oneview
- 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,19 +105,19 @@ 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.
type: dict type: dict
datacenter_visual_content: 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

View File

@ -8,44 +8,41 @@
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:
- Retrieve information about one or more of the Enclosures from OneView. - Retrieve information about one or more of the Enclosures from OneView.
requirements: requirements:
- hpOneView >= 2.0.1 - hpOneView >= 2.0.1
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
description: description:
- Enclosure name. - Enclosure name.
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
extends_documentation_fragment: extends_documentation_fragment:
- community.general.oneview - community.general.oneview
- 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
@ -98,9 +95,9 @@ EXAMPLES = '''
community.general.oneview_enclosure_info: community.general.oneview_enclosure_info:
name: Test-Enclosure name: Test-Enclosure
options: options:
- script # optional - script # optional
- environmentalConfiguration # optional - environmentalConfiguration # optional
- utilization # optional - utilization # optional
hostname: 172.16.101.48 hostname: 172.16.101.48
username: administrator username: administrator
password: my_password password: my_password
@ -125,12 +122,11 @@ 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:
- utilization: # optional - utilization: # optional
fields: AmbientTemperature fields: AmbientTemperature
filter: filter:
- startDate=2016-07-01T14:29:42.000Z - startDate=2016-07-01T14:29:42.000Z
@ -152,29 +148,29 @@ 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.
type: dict type: dict
enclosure_script: enclosure_script:
description: Has all the OneView information about the script of an Enclosure. description: Has all the OneView information about the script of an Enclosure.
returned: When requested, but can be null. returned: When requested, but can be null.
type: str type: str
enclosure_environmental_configuration: enclosure_environmental_configuration:
description: Has all the OneView information about the environmental configuration of an Enclosure. description: Has all the OneView information about the environmental configuration of an Enclosure.
returned: When requested, but can be null. returned: When requested, but can be null.
type: dict type: dict
enclosure_utilization: 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

View File

@ -7,46 +7,44 @@
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:
- Provides an interface to manage Ethernet Network resources. Can create, update, or delete. - Provides an interface to manage Ethernet Network resources. Can create, update, or delete.
requirements: requirements:
- hpOneView >= 3.1.0 - hpOneView >= 3.1.0
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
state: state:
description: description:
- Indicates the desired state for the Ethernet Network resource. - Indicates the desired state for the Ethernet 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.
- V(default_bandwidth_reset) will reset the network connection template to the default. - V(default_bandwidth_reset) will reset the network connection template to the default.
type: str type: str
default: present default: present
choices: [present, absent, default_bandwidth_reset] choices: [present, absent, default_bandwidth_reset]
data: data:
description: description:
- List with Ethernet Network properties. - List with Ethernet Network properties.
type: dict type: dict
required: true required: true
extends_documentation_fragment: 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'
@ -64,8 +62,8 @@ EXAMPLES = '''
name: 'Test Ethernet Network' name: 'Test Ethernet Network'
purpose: Management purpose: Management
bandwidth: bandwidth:
maximumBandwidth: 3000 maximumBandwidth: 3000
typicalBandwidth: 2000 typicalBandwidth: 2000
delegate_to: localhost delegate_to: localhost
- name: Ensure that the Ethernet Network is present with name 'Renamed Ethernet Network' - name: Ensure that the Ethernet Network is present with name 'Renamed Ethernet Network'
@ -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

View File

@ -7,42 +7,40 @@
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:
- Retrieve the information about one or more of the Ethernet Networks from OneView. - Retrieve the information about one or more of the Ethernet Networks from OneView.
requirements: requirements:
- hpOneView >= 2.0.1 - hpOneView >= 2.0.1
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
description: description:
- Ethernet Network name. - Ethernet Network name.
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:
- community.general.oneview - community.general.oneview
- 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,24 +94,24 @@ 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.
type: dict type: dict
enet_associated_profiles: enet_associated_profiles:
description: Has all the OneView information about the profiles which are using the Ethernet network. description: Has all the OneView information about the profiles which are using the Ethernet network.
returned: When requested, but can be null. returned: When requested, but can be null.
type: dict type: dict
enet_associated_uplink_groups: 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

View File

@ -7,43 +7,41 @@
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:
- Provides an interface to manage Fibre Channel Network resources. Can create, update, and delete. - Provides an interface to manage Fibre Channel Network resources. Can create, update, and delete.
requirements: requirements:
- "hpOneView >= 4.0.0" - "hpOneView >= 4.0.0"
author: "Felipe Bulsoni (@fgbulsoni)" author: "Felipe Bulsoni (@fgbulsoni)"
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: 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
data: data:
description: description:
- List with the Fibre Channel Network properties. - List with the Fibre Channel Network properties.
type: dict type: dict
required: true required: true
extends_documentation_fragment: 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

View File

@ -7,37 +7,35 @@
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:
- Retrieve the information about one or more of the Fibre Channel Networks from OneView. - Retrieve the information about one or more of the Fibre Channel Networks from OneView.
requirements: requirements:
- hpOneView >= 2.0.1 - hpOneView >= 2.0.1
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
description: description:
- Fibre Channel Network name. - Fibre Channel Network name.
type: str type: str
extends_documentation_fragment: extends_documentation_fragment:
- community.general.oneview - community.general.oneview
- 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

View File

@ -7,44 +7,42 @@
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:
- Provides an interface to manage FCoE Network resources. Can create, update, or delete. - Provides an interface to manage FCoE Network resources. Can create, update, or delete.
requirements: requirements:
- "Python >= 2.7.9" - "Python >= 2.7.9"
- "hpOneView >= 4.0.0" - "hpOneView >= 4.0.0"
author: "Felipe Bulsoni (@fgbulsoni)" author: "Felipe Bulsoni (@fgbulsoni)"
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: 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']
data: data:
description: description:
- List with FCoE Network properties. - List with FCoE Network properties.
type: dict type: dict
required: true required: true
extends_documentation_fragment: 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

View File

@ -7,36 +7,34 @@
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:
- Retrieve the information about one or more of the FCoE Networks from OneView. - Retrieve the information about one or more of the FCoE Networks from OneView.
requirements: requirements:
- hpOneView >= 2.0.1 - hpOneView >= 2.0.1
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
description: description:
- FCoE Network name. - FCoE Network name.
type: str type: str
extends_documentation_fragment: extends_documentation_fragment:
- community.general.oneview - community.general.oneview
- 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

View File

@ -8,45 +8,43 @@
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:
- Provides an interface to manage Logical Interconnect Group resources. Can create, update, or delete. - Provides an interface to manage Logical Interconnect Group resources. Can create, update, or delete.
requirements: requirements:
- hpOneView >= 4.0.0 - hpOneView >= 4.0.0
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: 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
data: data:
description: description:
- List with the Logical Interconnect Group properties. - List with the Logical Interconnect Group properties.
type: dict type: dict
required: true required: true
extends_documentation_fragment: 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,15 +55,15 @@ EXAMPLES = '''
enclosureType: C7000 enclosureType: C7000
interconnectMapTemplate: interconnectMapTemplate:
interconnectMapEntryTemplates: interconnectMapEntryTemplates:
- logicalDownlinkUri: ~ - logicalDownlinkUri:
logicalLocation: logicalLocation:
locationEntries: locationEntries:
- relativeValue: 1 - relativeValue: 1
type: Bay type: Bay
- relativeValue: 1 - relativeValue: 1
type: Enclosure type: Enclosure
permittedInterconnectTypeName: HP VC Flex-10/10D Module permittedInterconnectTypeName: HP VC Flex-10/10D Module
# Alternatively you can inform permittedInterconnectTypeUri # Alternatively you can inform permittedInterconnectTypeUri
delegate_to: localhost delegate_to: localhost
- name: Ensure that the Logical Interconnect Group has the specified scopes - name: Ensure that the Logical Interconnect Group has the specified scopes
@ -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

View File

@ -8,36 +8,34 @@
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:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
description: description:
- Logical Interconnect Group name. - Logical Interconnect Group name.
type: str type: str
extends_documentation_fragment: extends_documentation_fragment:
- community.general.oneview - community.general.oneview
- 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

View File

@ -7,46 +7,44 @@
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:
- Provides an interface to manage Network Set resources. Can create, update, or delete. - Provides an interface to manage Network Set resources. Can create, update, or delete.
requirements: requirements:
- hpOneView >= 4.0.0 - hpOneView >= 4.0.0
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
state: state:
description: description:
- Indicates the desired state for the Network Set resource. - Indicates the desired state for the Network Set 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']
data: data:
description: description:
- List with the Network Set properties. - List with the Network Set properties.
type: dict type: dict
required: true required: true
extends_documentation_fragment: 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
@ -54,8 +52,8 @@ EXAMPLES = '''
data: data:
name: OneViewSDK Test Network Set name: OneViewSDK Test Network Set
networkUris: networkUris:
- Test Ethernet Network_1 # can be a name - Test Ethernet Network_1 # can be a name
- /rest/ethernet-networks/e4360c9d-051d-4931-b2aa-7de846450dd8 # or a URI - /rest/ethernet-networks/e4360c9d-051d-4931-b2aa-7de846450dd8 # or a URI
delegate_to: localhost delegate_to: localhost
- name: Update the Network Set name to 'OneViewSDK Test Network Set - Renamed' and change the associated networks - name: Update the Network Set name to 'OneViewSDK Test Network Set - Renamed' and change the associated networks
@ -74,7 +72,7 @@ EXAMPLES = '''
config: /etc/oneview/oneview_config.json config: /etc/oneview/oneview_config.json
state: absent state: absent
data: data:
name: OneViewSDK Test Network Set - Renamed name: OneViewSDK Test Network Set - Renamed
delegate_to: localhost delegate_to: localhost
- name: Update the Network set with two scopes - name: Update the Network set with two scopes
@ -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

View File

@ -7,45 +7,42 @@
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:
- Retrieve information about the Network Sets from OneView. - Retrieve information about the Network Sets from OneView.
requirements: requirements:
- hpOneView >= 2.0.1 - hpOneView >= 2.0.1
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
description: description:
- Network Set name. - Network Set name.
type: str type: str
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
extends_documentation_fragment: extends_documentation_fragment:
- community.general.oneview - community.general.oneview
- 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
@ -86,7 +83,7 @@ EXAMPLES = '''
password: my_password password: my_password
api_version: 500 api_version: 500
options: options:
- withoutEthernet - withoutEthernet
no_log: true no_log: true
delegate_to: localhost delegate_to: localhost
register: result register: result
@ -118,7 +115,7 @@ EXAMPLES = '''
api_version: 500 api_version: 500
name: Name of the Network Set name: Name of the Network Set
options: options:
- withoutEthernet - withoutEthernet
no_log: true no_log: true
delegate_to: localhost delegate_to: localhost
register: result register: result
@ -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

View File

@ -7,47 +7,46 @@
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:
- Provides an interface to manage SAN Manager resources. Can create, update, or delete. - Provides an interface to manage SAN Manager resources. Can create, update, or delete.
requirements: requirements:
- hpOneView >= 3.1.1 - hpOneView >= 3.1.1
author: author:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
state: state:
description: description:
- 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.
type: str This operation is non-idempotent.
default: present type: str
choices: [present, absent, connection_information_set] default: present
data: choices: [present, absent, connection_information_set]
description: data:
- List with SAN Manager properties. description:
type: dict - List with SAN Manager properties.
required: true type: dict
required: true
extends_documentation_fragment: 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

View File

@ -7,44 +7,42 @@
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:
- Felipe Bulsoni (@fgbulsoni) - Felipe Bulsoni (@fgbulsoni)
- Thiago Miotto (@tmiotto) - Thiago Miotto (@tmiotto)
- Adriane Cardozo (@adriane-cardozo) - Adriane Cardozo (@adriane-cardozo)
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
provider_display_name: provider_display_name:
description: description:
- Provider Display Name. - Provider Display Name.
type: str type: str
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

View File

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

View File

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

View File

@ -8,103 +8,99 @@
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:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: none support: none
options: options:
portal: portal:
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.
type: str type: str
default: '3260' default: '3260'
target: target:
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).
type: str type: str
default: CHAP default: CHAP
node_user: node_user:
description: description:
- The value for C(node.session.auth.username). - The value for C(node.session.auth.username).
type: str type: str
node_pass: node_pass:
description: description:
- The value for C(node.session.auth.password). - The value for C(node.session.auth.password).
type: str type: str
node_user_in: node_user_in:
description: description:
- The value for C(node.session.auth.username_in). - The value for C(node.session.auth.username_in).
type: str type: str
version_added: 3.8.0 version_added: 3.8.0
node_pass_in: node_pass_in:
description: description:
- The value for C(node.session.auth.password_in). - The value for C(node.session.auth.password_in).
type: str type: str
version_added: 3.8.0 version_added: 3.8.0
auto_node_startup: auto_node_startup:
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.
type: bool type: bool
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 type: bool
a changed state. default: false
type: bool show_nodes:
default: false description:
show_nodes: - Whether the list of nodes in the persistent iSCSI database should be returned by the module.
description: type: bool
- Whether the list of nodes in the persistent iSCSI database should be returned by the module. default: false
type: bool rescan:
default: false description:
rescan: - Rescan an established session for discovering new targets.
description: - When O(target) is omitted, will rescan all sessions.
- Rescan an established session for discovering new targets. type: bool
- When O(target) is omitted, will rescan all sessions. default: false
type: bool version_added: 4.1.0
default: false """
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

View File

@ -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)
@ -21,69 +20,64 @@ description:
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: partial support: partial
version_added: 9.1.0 version_added: 9.1.0
details: details:
- Only works when check mode is not enabled. - Only works when check mode is not enabled.
options: options:
name: name:
description: description:
- A name or a list of names of the packages. - A name or a list of names of the packages.
required: true required: true
type: list type: list
elements: str elements: str
state: state:
description: description:
- 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 - Mutually exclusive with O(snapshot).
not already installed. type: bool
- Mutually exclusive with O(snapshot). default: false
type: bool snapshot:
default: false description:
snapshot: - Force C(%c) and C(%m) to expand to C(snapshots), even on a release kernel.
description: - Mutually exclusive with O(build).
- Force C(%c) and C(%m) to expand to C(snapshots), even on a release kernel. type: bool
- Mutually exclusive with O(build). default: false
type: bool version_added: 1.3.0
default: false ports_dir:
version_added: 1.3.0 description:
ports_dir: - When used in combination with the O(build) option, allows overriding the default ports source directory.
description: default: /usr/ports
- When used in combination with the O(build) option, allows overriding type: path
the default ports source directory. clean:
default: /usr/ports description:
type: path - When updating or removing packages, delete the extra configuration file(s) in the old packages which are annotated with @extra in the
clean: packaging-list.
description: type: bool
- When updating or removing packages, delete the extra configuration default: false
file(s) in the old packages which are annotated with @extra in quick:
the packaging-list. description:
type: bool - Replace or delete packages quickly; do not bother with checksums before removing normal files.
default: false type: bool
quick: default: false
description:
- Replace or delete packages quickly; do not bother with checksums
before removing normal files.
type: bool
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

View File

@ -8,94 +8,93 @@
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:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: none support: none
options: options:
opendj_bindir: opendj_bindir:
description: description:
- The path to the bin directory of OpenDJ. - The path to the bin directory of OpenDJ.
required: false required: false
default: /opt/opendj/bin default: /opt/opendj/bin
type: path type: path
hostname: hostname:
description: description:
- The hostname of the OpenDJ server. - The hostname of the OpenDJ server.
required: true required: true
type: str type: str
port: port:
description: description:
- The Admin port on which the OpenDJ instance is available. - The Admin port on which the OpenDJ instance is available.
required: true required: true
type: str type: str
username: username:
description: description:
- The username to connect to. - The username to connect to.
required: false required: false
default: cn=Directory Manager default: cn=Directory Manager
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
backend: backend:
description: description:
- The name of the backend on which the property needs to be updated. - The name of the backend on which the property needs to be updated.
required: true required: true
type: str type: str
name: name:
description: description:
- The configuration setting to update. - The configuration setting to update.
required: true required: true
type: str type: str
value: value:
description: description:
- The value for the configuration item. - The value for the configuration item.
required: true required: true
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

View File

@ -8,52 +8,50 @@ 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)"
short_description: Manage services on OpenWrt short_description: Manage services on OpenWrt
description: description:
- Controls OpenWrt services on remote hosts. - Controls OpenWrt services on remote hosts.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
type: str type: str
description: description:
- Name of the service. - Name of the service.
required: true required: true
aliases: ['service'] aliases: ['service']
state: state:
type: str type: str
description: description:
- 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

View File

@ -11,71 +11,68 @@ 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:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: 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 aliases: [pkg]
supported since community.general 6.2.0. required: true
aliases: [pkg] type: list
required: true elements: str
type: list state:
elements: str description:
state: - State of the package.
description: choices: ['present', 'absent', 'installed', 'removed']
- State of the package. default: present
choices: [ 'present', 'absent', 'installed', 'removed' ] type: str
default: present force:
type: str description:
force: - The C(opkg --force) parameter used.
description: - State V("") is deprecated and will be removed in community.general 12.0.0. Please omit the parameter O(force) to obtain the same behavior.
- The C(opkg --force) parameter used. choices:
- State V("") is deprecated and will be removed in community.general 12.0.0. Please omit the parameter O(force) to obtain the same behavior. - ""
choices: - "depends"
- "" - "maintainer"
- "depends" - "reinstall"
- "maintainer" - "overwrite"
- "reinstall" - "downgrade"
- "overwrite" - "space"
- "downgrade" - "postinstall"
- "space" - "remove"
- "postinstall" - "checksum"
- "remove" - "removal-of-dependent-packages"
- "checksum" type: str
- "removal-of-dependent-packages" update_cache:
type: str description:
update_cache: - Update the package DB first.
description: default: false
- Update the package DB first. type: bool
default: false executable:
type: bool description:
executable: - The executable location for C(opkg).
description: type: path
- The executable location for C(opkg). version_added: 7.2.0
type: path
version_added: 7.2.0
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

View File

@ -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:
@ -80,10 +78,10 @@ options:
type: str type: str
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

View File

@ -9,88 +9,79 @@ 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:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: none support: none
options: 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 V(ovh-eu)).
- The endpoint to use ( for instance 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 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. wait_task_completion:
If false, exit without waiting. The taskId will be returned required: false
in module output default: 0
wait_task_completion: description:
required: false - 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
default: 0 executed task with O(wait_completion=false). You can execute this module repeatedly on a list of failover IPs using O(wait_completion=false)
description: (see examples).
- If not 0, the module will wait for this task id to be type: int
completed. Use wait_task_completion if you want to wait for application_key:
completion of a previously executed task with required: true
wait_completion=false. You can execute this module repeatedly on description:
a list of failover IPs using wait_completion=false (see examples) - The applicationKey to use.
type: int type: str
application_key: application_secret:
required: true required: true
description: description:
- The applicationKey to use - The application secret to use.
type: str type: str
application_secret: consumer_key:
required: true required: true
description: description:
- The application secret to use - The consumer key to use.
type: str type: str
consumer_key: timeout:
required: true required: false
description: default: 120
- The consumer key to use description:
type: str - The timeout in seconds used to wait for a task to be completed. Default is 120 seconds.
timeout: type: int
required: false """
default: 120
description:
- The timeout in seconds used to wait for a task to be
completed. Default is 120 seconds.
type: int
''' EXAMPLES = 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

View File

@ -9,85 +9,80 @@ 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:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: 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 completed.
- The timeout in seconds used to wait for a task to be type: int
completed. """
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

View File

@ -9,52 +9,51 @@ 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:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: none support: none
options: options:
project_id: project_id:
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