i[b-n]*.py: normalize docs (#9393)
* i[b-n]*.py: normalize docs * Update plugins/modules/ilo_redfish_command.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>pull/9420/head
parent
61b2304f4d
commit
84655b0d0f
|
@ -10,14 +10,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ibm_sa_domain
|
||||
short_description: Manages domains on IBM Spectrum Accelerate Family storage systems
|
||||
|
||||
description:
|
||||
- "This module can be used to add domains to or removes them from IBM Spectrum Accelerate Family storage systems."
|
||||
|
||||
- This module can be used to add domains to or removes them from IBM Spectrum Accelerate Family storage systems.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -34,11 +32,11 @@ options:
|
|||
description:
|
||||
- The desired state of the domain.
|
||||
default: "present"
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
type: str
|
||||
ldap_id:
|
||||
description:
|
||||
- ldap id to add to the domain.
|
||||
- LDAP id to add to the domain.
|
||||
required: false
|
||||
type: str
|
||||
size:
|
||||
|
@ -93,9 +91,9 @@ extends_documentation_fragment:
|
|||
|
||||
author:
|
||||
- Tzur Eliyahu (@tzure)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Define new domain.
|
||||
community.general.ibm_sa_domain:
|
||||
domain: domain_name
|
||||
|
@ -112,14 +110,14 @@ EXAMPLES = '''
|
|||
username: admin
|
||||
password: secret
|
||||
endpoints: hostdev-system
|
||||
'''
|
||||
RETURN = '''
|
||||
"""
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: module return status.
|
||||
description: Module return status.
|
||||
returned: as needed
|
||||
type: str
|
||||
sample: "domain 'domain_name' created successfully."
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import execute_pyxcli_command, \
|
||||
|
|
|
@ -10,14 +10,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ibm_sa_host
|
||||
short_description: Adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems
|
||||
|
||||
description:
|
||||
- "This module adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems."
|
||||
|
||||
- This module adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -34,7 +32,7 @@ options:
|
|||
description:
|
||||
- Host state.
|
||||
default: "present"
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
type: str
|
||||
cluster:
|
||||
description:
|
||||
|
@ -43,21 +41,18 @@ options:
|
|||
type: str
|
||||
domain:
|
||||
description:
|
||||
- The domains the cluster will be attached to.
|
||||
To include more than one domain,
|
||||
separate domain names with commas.
|
||||
To include all existing domains, use an asterisk ("*").
|
||||
- The domains the cluster will be attached to. To include more than one domain, separate domain names with commas. To
|
||||
include all existing domains, use an asterisk (V(*)).
|
||||
required: false
|
||||
type: str
|
||||
iscsi_chap_name:
|
||||
description:
|
||||
- The host's CHAP name identifier
|
||||
- The host's CHAP name identifier.
|
||||
required: false
|
||||
type: str
|
||||
iscsi_chap_secret:
|
||||
description:
|
||||
- The password of the initiator used to
|
||||
authenticate to the system when CHAP is enable
|
||||
- The password of the initiator used to authenticate to the system when CHAP is enable.
|
||||
required: false
|
||||
type: str
|
||||
|
||||
|
@ -67,9 +62,9 @@ extends_documentation_fragment:
|
|||
|
||||
author:
|
||||
- Tzur Eliyahu (@tzure)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Define new host.
|
||||
community.general.ibm_sa_host:
|
||||
host: host_name
|
||||
|
@ -85,9 +80,9 @@ EXAMPLES = '''
|
|||
username: admin
|
||||
password: secret
|
||||
endpoints: hostdev-system
|
||||
'''
|
||||
RETURN = '''
|
||||
'''
|
||||
"""
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import execute_pyxcli_command, \
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ibm_sa_host_ports
|
||||
short_description: Add host ports on IBM Spectrum Accelerate Family storage systems
|
||||
|
||||
description:
|
||||
- "This module adds ports to or removes them from the hosts
|
||||
on IBM Spectrum Accelerate Family storage systems."
|
||||
|
||||
- This module adds ports to or removes them from the hosts on IBM Spectrum Accelerate Family storage systems.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -35,11 +32,11 @@ options:
|
|||
description:
|
||||
- Host ports state.
|
||||
default: "present"
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
type: str
|
||||
iscsi_name:
|
||||
description:
|
||||
- iSCSI initiator name.
|
||||
- The iSCSI initiator name.
|
||||
required: false
|
||||
type: str
|
||||
fcaddress:
|
||||
|
@ -59,9 +56,9 @@ extends_documentation_fragment:
|
|||
|
||||
author:
|
||||
- Tzur Eliyahu (@tzure)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Add ports for host.
|
||||
community.general.ibm_sa_host_ports:
|
||||
host: test_host
|
||||
|
@ -79,10 +76,9 @@ EXAMPLES = '''
|
|||
password: secret
|
||||
endpoints: hostdev-system
|
||||
state: absent
|
||||
|
||||
'''
|
||||
RETURN = '''
|
||||
'''
|
||||
"""
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import (execute_pyxcli_command, connect_ssl,
|
||||
|
|
|
@ -10,14 +10,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ibm_sa_pool
|
||||
short_description: Handles pools on IBM Spectrum Accelerate Family storage systems
|
||||
|
||||
description:
|
||||
- "This module creates or deletes pools to be used on IBM Spectrum Accelerate Family storage systems"
|
||||
|
||||
- This module creates or deletes pools to be used on IBM Spectrum Accelerate Family storage systems.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -34,16 +32,16 @@ options:
|
|||
description:
|
||||
- Pool state.
|
||||
default: "present"
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
type: str
|
||||
size:
|
||||
description:
|
||||
- Pool size in GB
|
||||
- Pool size in GB.
|
||||
required: false
|
||||
type: str
|
||||
snapshot_size:
|
||||
description:
|
||||
- Pool snapshot size in GB
|
||||
- Pool snapshot size in GB.
|
||||
required: false
|
||||
type: str
|
||||
domain:
|
||||
|
@ -63,9 +61,9 @@ extends_documentation_fragment:
|
|||
|
||||
author:
|
||||
- Tzur Eliyahu (@tzure)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Create new pool.
|
||||
community.general.ibm_sa_pool:
|
||||
name: pool_name
|
||||
|
@ -82,9 +80,9 @@ EXAMPLES = '''
|
|||
username: admin
|
||||
password: secret
|
||||
endpoints: hostdev-system
|
||||
'''
|
||||
RETURN = '''
|
||||
'''
|
||||
"""
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import execute_pyxcli_command, \
|
||||
|
|
|
@ -10,14 +10,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ibm_sa_vol
|
||||
short_description: Handle volumes on IBM Spectrum Accelerate Family storage systems
|
||||
|
||||
description:
|
||||
- "This module creates or deletes volumes to be used on IBM Spectrum Accelerate Family storage systems."
|
||||
|
||||
- This module creates or deletes volumes to be used on IBM Spectrum Accelerate Family storage systems.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -39,7 +37,7 @@ options:
|
|||
description:
|
||||
- Volume state.
|
||||
default: "present"
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
type: str
|
||||
size:
|
||||
description:
|
||||
|
@ -53,9 +51,9 @@ extends_documentation_fragment:
|
|||
|
||||
author:
|
||||
- Tzur Eliyahu (@tzure)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Create a new volume.
|
||||
community.general.ibm_sa_vol:
|
||||
vol: volume_name
|
||||
|
@ -73,9 +71,9 @@ EXAMPLES = '''
|
|||
username: admin
|
||||
password: secret
|
||||
endpoints: hostdev-system
|
||||
'''
|
||||
RETURN = '''
|
||||
'''
|
||||
"""
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import execute_pyxcli_command, \
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ibm_sa_vol_map
|
||||
short_description: Handles volume mapping on IBM Spectrum Accelerate Family storage systems
|
||||
|
||||
description:
|
||||
- "This module maps volumes to or unmaps them from the hosts on
|
||||
IBM Spectrum Accelerate Family storage systems."
|
||||
|
||||
- This module maps volumes to or unmaps them from the hosts on IBM Spectrum Accelerate Family storage systems.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -33,10 +30,9 @@ options:
|
|||
type: str
|
||||
state:
|
||||
default: "present"
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
description:
|
||||
- When the state is present the volume is mapped.
|
||||
When the state is absent, the volume is meant to be unmapped.
|
||||
- When the state is present the volume is mapped. When the state is absent, the volume is meant to be unmapped.
|
||||
type: str
|
||||
|
||||
cluster:
|
||||
|
@ -66,9 +62,9 @@ extends_documentation_fragment:
|
|||
|
||||
author:
|
||||
- Tzur Eliyahu (@tzure)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Map volume to host.
|
||||
community.general.ibm_sa_vol_map:
|
||||
vol: volume_name
|
||||
|
@ -96,9 +92,9 @@ EXAMPLES = '''
|
|||
password: secret
|
||||
endpoints: hostdev-system
|
||||
state: absent
|
||||
'''
|
||||
RETURN = '''
|
||||
'''
|
||||
"""
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import (execute_pyxcli_command,
|
||||
|
|
|
@ -13,8 +13,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: icinga2_feature
|
||||
|
||||
short_description: Manage Icinga2 feature
|
||||
|
@ -41,11 +40,11 @@ options:
|
|||
- If set to V(present) and feature is already enabled, then nothing is changed.
|
||||
- If set to V(absent) and feature is enabled, then feature is disabled.
|
||||
- If set to V(absent) and feature is already disabled, then nothing is changed.
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
default: present
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Enable ido-pgsql feature
|
||||
community.general.icinga2_feature:
|
||||
name: ido-pgsql
|
||||
|
@ -55,11 +54,11 @@ EXAMPLES = '''
|
|||
community.general.icinga2_feature:
|
||||
name: api
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
#
|
||||
'''
|
||||
"""
|
||||
|
||||
import re
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -11,13 +11,12 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: icinga2_host
|
||||
short_description: Manage a host in Icinga2
|
||||
description:
|
||||
- "Add or remove a host to Icinga2 through the API."
|
||||
- "See U(https://www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/)"
|
||||
- Add or remove a host to Icinga2 through the API.
|
||||
- See U(https://www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/).
|
||||
author: "Jurgen Brand (@t794104)"
|
||||
attributes:
|
||||
check_mode:
|
||||
|
@ -28,17 +27,16 @@ options:
|
|||
url:
|
||||
type: str
|
||||
description:
|
||||
- HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
|
||||
- HTTP, HTTPS, or FTP URL in the form V((http|https|ftp\)://[user[:pass]]@host.domain[:port]/path).
|
||||
use_proxy:
|
||||
description:
|
||||
- If V(false), it will not use a proxy, even if one is defined in
|
||||
an environment variable on the target hosts.
|
||||
- If V(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
|
||||
type: bool
|
||||
default: true
|
||||
validate_certs:
|
||||
description:
|
||||
- If V(false), SSL certificates will not be validated. This should only be used
|
||||
on personally controlled sites using self-signed certificates.
|
||||
- If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using
|
||||
self-signed certificates.
|
||||
type: bool
|
||||
default: true
|
||||
url_username:
|
||||
|
@ -53,29 +51,26 @@ options:
|
|||
- If the O(url_username) parameter is not specified, the O(url_password) parameter will not be used.
|
||||
force_basic_auth:
|
||||
description:
|
||||
- httplib2, the library used by the uri module only sends authentication information when a webservice
|
||||
responds to an initial request with a 401 status. Since some basic auth services do not properly
|
||||
send a 401, logins will fail. This option forces the sending of the Basic authentication header
|
||||
upon initial request.
|
||||
- Httplib2, the library used by the uri module only sends authentication information when a webservice responds to an
|
||||
initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This
|
||||
option forces the sending of the Basic authentication header upon initial request.
|
||||
type: bool
|
||||
default: false
|
||||
client_cert:
|
||||
type: path
|
||||
description:
|
||||
- PEM formatted certificate chain file to be used for SSL client
|
||||
authentication. This file can also include the key as well, and if
|
||||
the key is included, O(client_key) is not required.
|
||||
- PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key
|
||||
as well, and if the key is included, O(client_key) is not required.
|
||||
client_key:
|
||||
type: path
|
||||
description:
|
||||
- PEM formatted file that contains your private key to be used for SSL
|
||||
client authentication. If O(client_cert) contains both the certificate
|
||||
and key, this option is not required.
|
||||
- PEM formatted file that contains your private key to be used for SSL client authentication. If O(client_cert) contains
|
||||
both the certificate and key, this option is not required.
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- Apply feature state.
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
default: present
|
||||
name:
|
||||
type: str
|
||||
|
@ -114,9 +109,9 @@ options:
|
|||
extends_documentation_fragment:
|
||||
- ansible.builtin.url
|
||||
- community.general.attributes
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Add host to icinga
|
||||
community.general.icinga2_host:
|
||||
url: "https://icinga2.example.com"
|
||||
|
@ -128,18 +123,18 @@ EXAMPLES = '''
|
|||
variables:
|
||||
foo: "bar"
|
||||
delegate_to: 127.0.0.1
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
name:
|
||||
description: The name used to create, modify or delete the host
|
||||
description: The name used to create, modify or delete the host.
|
||||
type: str
|
||||
returned: always
|
||||
data:
|
||||
description: The data structure used for create, modify or delete of the host
|
||||
description: The data structure used for create, modify or delete of the host.
|
||||
type: dict
|
||||
returned: always
|
||||
'''
|
||||
"""
|
||||
|
||||
import json
|
||||
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: idrac_redfish_command
|
||||
short_description: Manages Out-Of-Band controllers using iDRAC OEM Redfish APIs
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to
|
||||
perform an action.
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action.
|
||||
- For use with Dell iDRAC operations that require Redfish OEM extensions.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -66,10 +64,10 @@ options:
|
|||
version_added: '0.2.0'
|
||||
|
||||
author: "Jose Delarosa (@jose-delarosa)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Create BIOS configuration job (schedule BIOS setting update)
|
||||
EXAMPLES = r"""
|
||||
- name: Create BIOS configuration job (schedule BIOS setting update)
|
||||
community.general.idrac_redfish_command:
|
||||
category: Systems
|
||||
command: CreateBiosConfigJob
|
||||
|
@ -77,11 +75,11 @@ EXAMPLES = '''
|
|||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: Message with action result or error description
|
||||
description: Message with action result or error description.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "Action was successful"
|
||||
|
@ -90,10 +88,8 @@ return_values:
|
|||
returned: on success
|
||||
type: dict
|
||||
version_added: 6.6.0
|
||||
sample: {
|
||||
"job_id": "/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_471269252011"
|
||||
}
|
||||
'''
|
||||
sample: {"job_id": "/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_471269252011"}
|
||||
"""
|
||||
|
||||
import re
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -8,14 +8,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: idrac_redfish_config
|
||||
short_description: Manages servers through iDRAC using Dell Redfish APIs
|
||||
description:
|
||||
- For use with Dell iDRAC operations that require Redfish OEM extensions
|
||||
- Builds Redfish URIs locally and sends them to remote iDRAC controllers to
|
||||
set or update a configuration attribute.
|
||||
- For use with Dell iDRAC operations that require Redfish OEM extensions.
|
||||
- Builds Redfish URIs locally and sends them to remote iDRAC controllers to set or update a configuration attribute.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -33,9 +31,8 @@ options:
|
|||
required: true
|
||||
description:
|
||||
- List of commands to execute on iDRAC.
|
||||
- V(SetManagerAttributes), V(SetLifecycleControllerAttributes) and
|
||||
V(SetSystemAttributes) are mutually exclusive commands when O(category)
|
||||
is V(Manager).
|
||||
- V(SetManagerAttributes), V(SetLifecycleControllerAttributes) and V(SetSystemAttributes) are mutually exclusive commands
|
||||
when O(category) is V(Manager).
|
||||
type: list
|
||||
elements: str
|
||||
baseuri:
|
||||
|
@ -76,10 +73,10 @@ options:
|
|||
version_added: '0.2.0'
|
||||
|
||||
author: "Jose Delarosa (@jose-delarosa)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Enable NTP and set NTP server and Time zone attributes in iDRAC
|
||||
EXAMPLES = r"""
|
||||
- name: Enable NTP and set NTP server and Time zone attributes in iDRAC
|
||||
community.general.idrac_redfish_config:
|
||||
category: Manager
|
||||
command: SetManagerAttributes
|
||||
|
@ -92,7 +89,7 @@ EXAMPLES = '''
|
|||
username: "{{ username}}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Enable Syslog and set Syslog servers in iDRAC
|
||||
- name: Enable Syslog and set Syslog servers in iDRAC
|
||||
community.general.idrac_redfish_config:
|
||||
category: Manager
|
||||
command: SetManagerAttributes
|
||||
|
@ -105,7 +102,7 @@ EXAMPLES = '''
|
|||
username: "{{ username}}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Configure SNMP community string, port, protocol and trap format
|
||||
- name: Configure SNMP community string, port, protocol and trap format
|
||||
community.general.idrac_redfish_config:
|
||||
category: Manager
|
||||
command: SetManagerAttributes
|
||||
|
@ -121,7 +118,7 @@ EXAMPLES = '''
|
|||
username: "{{ username}}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Enable CSIOR
|
||||
- name: Enable CSIOR
|
||||
community.general.idrac_redfish_config:
|
||||
category: Manager
|
||||
command: SetLifecycleControllerAttributes
|
||||
|
@ -132,7 +129,7 @@ EXAMPLES = '''
|
|||
username: "{{ username}}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Set Power Supply Redundancy Policy to A/B Grid Redundant
|
||||
- name: Set Power Supply Redundancy Policy to A/B Grid Redundant
|
||||
community.general.idrac_redfish_config:
|
||||
category: Manager
|
||||
command: SetSystemAttributes
|
||||
|
@ -142,15 +139,15 @@ EXAMPLES = '''
|
|||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username}}"
|
||||
password: "{{ password }}"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: Message with action result or error description
|
||||
description: Message with action result or error description.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "Action was successful"
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.validation import (
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: idrac_redfish_info
|
||||
short_description: Gather PowerEdge server information through iDRAC using Redfish APIs
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to remote iDRAC controllers to
|
||||
get information back.
|
||||
- Builds Redfish URIs locally and sends them to remote iDRAC controllers to get information back.
|
||||
- For use with Dell EMC iDRAC operations that require Redfish OEM extensions.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -33,8 +31,7 @@ options:
|
|||
required: true
|
||||
description:
|
||||
- List of commands to execute on iDRAC.
|
||||
- V(GetManagerAttributes) returns the list of dicts containing iDRAC,
|
||||
LifecycleController and System attributes.
|
||||
- V(GetManagerAttributes) returns the list of dicts containing iDRAC, LifecycleController and System attributes.
|
||||
type: list
|
||||
elements: str
|
||||
baseuri:
|
||||
|
@ -62,10 +59,10 @@ options:
|
|||
type: int
|
||||
|
||||
author: "Jose Delarosa (@jose-delarosa)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Get Manager attributes with a default of 20 seconds
|
||||
EXAMPLES = r"""
|
||||
- name: Get Manager attributes with a default of 20 seconds
|
||||
community.general.idrac_redfish_info:
|
||||
category: Manager
|
||||
command: GetManagerAttributes
|
||||
|
@ -75,54 +72,56 @@ EXAMPLES = '''
|
|||
timeout: 20
|
||||
register: result
|
||||
|
||||
# Examples to display the value of all or a single iDRAC attribute
|
||||
- name: Store iDRAC attributes as a fact variable
|
||||
# Examples to display the value of all or a single iDRAC attribute
|
||||
- name: Store iDRAC attributes as a fact variable
|
||||
ansible.builtin.set_fact:
|
||||
idrac_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'iDRACAttributes') | list | first }}"
|
||||
idrac_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'iDRACAttributes')
|
||||
| list | first }}"
|
||||
|
||||
- name: Display all iDRAC attributes
|
||||
- name: Display all iDRAC attributes
|
||||
ansible.builtin.debug:
|
||||
var: idrac_attributes
|
||||
|
||||
- name: Display the value of 'Syslog.1.SysLogEnable' iDRAC attribute
|
||||
- name: Display the value of 'Syslog.1.SysLogEnable' iDRAC attribute
|
||||
ansible.builtin.debug:
|
||||
var: idrac_attributes['Syslog.1.SysLogEnable']
|
||||
|
||||
# Examples to display the value of all or a single LifecycleController attribute
|
||||
- name: Store LifecycleController attributes as a fact variable
|
||||
# Examples to display the value of all or a single LifecycleController attribute
|
||||
- name: Store LifecycleController attributes as a fact variable
|
||||
ansible.builtin.set_fact:
|
||||
lc_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'LCAttributes') | list | first }}"
|
||||
lc_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'LCAttributes')
|
||||
| list | first }}"
|
||||
|
||||
- name: Display LifecycleController attributes
|
||||
- name: Display LifecycleController attributes
|
||||
ansible.builtin.debug:
|
||||
var: lc_attributes
|
||||
|
||||
- name: Display the value of 'CollectSystemInventoryOnRestart' attribute
|
||||
- name: Display the value of 'CollectSystemInventoryOnRestart' attribute
|
||||
ansible.builtin.debug:
|
||||
var: lc_attributes['LCAttributes.1.CollectSystemInventoryOnRestart']
|
||||
|
||||
# Examples to display the value of all or a single System attribute
|
||||
- name: Store System attributes as a fact variable
|
||||
# Examples to display the value of all or a single System attribute
|
||||
- name: Store System attributes as a fact variable
|
||||
ansible.builtin.set_fact:
|
||||
system_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'SystemAttributes') | list | first }}"
|
||||
system_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'SystemAttributes')
|
||||
| list | first }}"
|
||||
|
||||
- name: Display System attributes
|
||||
- name: Display System attributes
|
||||
ansible.builtin.debug:
|
||||
var: system_attributes
|
||||
|
||||
- name: Display the value of 'PSRedPolicy'
|
||||
- name: Display the value of 'PSRedPolicy'
|
||||
ansible.builtin.debug:
|
||||
var: system_attributes['ServerPwr.1.PSRedPolicy']
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: different results depending on task
|
||||
description: Different results depending on task.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: List of Manager attributes
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils
|
||||
|
|
|
@ -6,14 +6,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ilo_redfish_command
|
||||
short_description: Manages Out-Of-Band controllers using Redfish APIs
|
||||
version_added: 6.6.0
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to
|
||||
perform an action.
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -62,19 +60,19 @@ options:
|
|||
type: int
|
||||
author:
|
||||
- Varni H P (@varini-hp)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Wait for iLO Reboot Completion
|
||||
EXAMPLES = r"""
|
||||
- name: Wait for iLO Reboot Completion
|
||||
community.general.ilo_redfish_command:
|
||||
category: Systems
|
||||
command: WaitforiLORebootCompletion
|
||||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
ilo_redfish_command:
|
||||
description: Returns the status of the operation performed on the iLO.
|
||||
type: dict
|
||||
|
@ -84,13 +82,13 @@ ilo_redfish_command:
|
|||
type: dict
|
||||
contains:
|
||||
ret:
|
||||
description: Return True/False based on whether the operation was performed successfully.
|
||||
description: Return V(true)/V(false) based on whether the operation was performed successfully.
|
||||
type: bool
|
||||
msg:
|
||||
description: Status of the operation performed on the iLO.
|
||||
type: str
|
||||
returned: always
|
||||
'''
|
||||
"""
|
||||
|
||||
# More will be added as module features are expanded
|
||||
CATEGORY_COMMANDS_ALL = {
|
||||
|
|
|
@ -6,14 +6,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ilo_redfish_config
|
||||
short_description: Sets or updates configuration attributes on HPE iLO with Redfish OEM extensions
|
||||
version_added: 4.2.0
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to iLO to
|
||||
set or update a configuration attribute.
|
||||
- Builds Redfish URIs locally and sends them to iLO to set or update a configuration attribute.
|
||||
- For use with HPE iLO operations that require Redfish OEM extensions.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -69,10 +67,10 @@ options:
|
|||
type: str
|
||||
author:
|
||||
- "Bhavya B (@bhavya06)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Disable WINS Registration
|
||||
EXAMPLES = r"""
|
||||
- name: Disable WINS Registration
|
||||
community.general.ilo_redfish_config:
|
||||
category: Manager
|
||||
command: SetWINSReg
|
||||
|
@ -81,7 +79,7 @@ EXAMPLES = '''
|
|||
password: Testpass123
|
||||
attribute_name: WINSRegistration
|
||||
|
||||
- name: Set Time Zone
|
||||
- name: Set Time Zone
|
||||
community.general.ilo_redfish_config:
|
||||
category: Manager
|
||||
command: SetTimeZone
|
||||
|
@ -91,7 +89,7 @@ EXAMPLES = '''
|
|||
attribute_name: TimeZone
|
||||
attribute_value: Chennai
|
||||
|
||||
- name: Set NTP Servers
|
||||
- name: Set NTP Servers
|
||||
community.general.ilo_redfish_config:
|
||||
category: Manager
|
||||
command: SetNTPServers
|
||||
|
@ -100,16 +98,15 @@ EXAMPLES = '''
|
|||
password: Testpass123
|
||||
attribute_name: StaticNTPServers
|
||||
attribute_value: X.X.X.X
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: Message with action result or error description
|
||||
description: Message with action result or error description.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "Action was successful"
|
||||
'''
|
||||
"""
|
||||
|
||||
CATEGORY_COMMANDS_ALL = {
|
||||
"Manager": ["SetTimeZone", "SetDNSserver", "SetDomainName", "SetNTPServers", "SetWINSReg"]
|
||||
|
|
|
@ -6,14 +6,12 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ilo_redfish_info
|
||||
short_description: Gathers server information through iLO using Redfish APIs
|
||||
version_added: 4.2.0
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to iLO to
|
||||
get information back.
|
||||
- Builds Redfish URIs locally and sends them to iLO to get information back.
|
||||
- For use with HPE iLO operations that require Redfish OEM extensions.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -55,10 +53,10 @@ options:
|
|||
type: int
|
||||
author:
|
||||
- "Bhavya B (@bhavya06)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Get iLO Sessions
|
||||
EXAMPLES = r"""
|
||||
- name: Get iLO Sessions
|
||||
community.general.ilo_redfish_info:
|
||||
category: Sessions
|
||||
command: GetiLOSessions
|
||||
|
@ -66,9 +64,9 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result_sessions
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
ilo_redfish_info:
|
||||
description: Returns iLO sessions.
|
||||
type: dict
|
||||
|
@ -98,7 +96,7 @@ ilo_redfish_info:
|
|||
description: Name to use to log in to the management processor.
|
||||
type: str
|
||||
returned: always
|
||||
'''
|
||||
"""
|
||||
|
||||
CATEGORY_COMMANDS_ALL = {
|
||||
"Sessions": ["GetiLOSessions"]
|
||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: imc_rest
|
||||
short_description: Manage Cisco IMC hardware through its REST API
|
||||
description:
|
||||
|
@ -34,13 +33,13 @@ options:
|
|||
description:
|
||||
- IP Address or hostname of Cisco IMC, resolvable by Ansible control host.
|
||||
required: true
|
||||
aliases: [ host, ip ]
|
||||
aliases: [host, ip]
|
||||
type: str
|
||||
username:
|
||||
description:
|
||||
- Username used to login to the switch.
|
||||
default: admin
|
||||
aliases: [ user ]
|
||||
aliases: [user]
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
|
@ -49,31 +48,30 @@ options:
|
|||
type: str
|
||||
path:
|
||||
description:
|
||||
- Name of the absolute path of the filename that includes the body
|
||||
of the http request being sent to the Cisco IMC REST API.
|
||||
- Name of the absolute path of the filename that includes the body of the http request being sent to the Cisco IMC REST
|
||||
API.
|
||||
- Parameter O(path) is mutual exclusive with parameter O(content).
|
||||
aliases: [ 'src', 'config_file' ]
|
||||
aliases: ['src', 'config_file']
|
||||
type: path
|
||||
content:
|
||||
description:
|
||||
- When used instead of O(path), sets the content of the API requests directly.
|
||||
- This may be convenient to template simple requests, for anything complex use the M(ansible.builtin.template) module.
|
||||
- You can collate multiple IMC XML fragments and they will be processed sequentially in a single stream,
|
||||
the Cisco IMC output is subsequently merged.
|
||||
- You can collate multiple IMC XML fragments and they will be processed sequentially in a single stream, the Cisco IMC
|
||||
output is subsequently merged.
|
||||
- Parameter O(content) is mutual exclusive with parameter O(path).
|
||||
type: str
|
||||
protocol:
|
||||
description:
|
||||
- Connection protocol to use.
|
||||
default: https
|
||||
choices: [ http, https ]
|
||||
choices: [http, https]
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
- The socket level timeout in seconds.
|
||||
- This is the time that every single connection (every fragment) can spend.
|
||||
If this O(timeout) is reached, the module will fail with a
|
||||
C(Connection failure) indicating that C(The read operation timed out).
|
||||
- This is the time that every single connection (every fragment) can spend. If this O(timeout) is reached, the module
|
||||
will fail with a C(Connection failure) indicating that C(The read operation timed out).
|
||||
default: 60
|
||||
type: int
|
||||
validate_certs:
|
||||
|
@ -83,18 +81,18 @@ options:
|
|||
type: bool
|
||||
default: true
|
||||
notes:
|
||||
- The XML fragments don't need an authentication cookie, this is injected by the module automatically.
|
||||
- The Cisco IMC XML output is being translated to JSON using the Cobra convention.
|
||||
- Any configConfMo change requested has a return status of 'modified', even if there was no actual change
|
||||
from the previous configuration. As a result, this module will always report a change on subsequent runs.
|
||||
In case this behaviour is fixed in a future update to Cisco IMC, this module will automatically adapt.
|
||||
- If you get a C(Connection failure) related to C(The read operation timed out) increase the O(timeout)
|
||||
parameter. Some XML fragments can take longer than the default timeout.
|
||||
- More information about the IMC REST API is available from
|
||||
U(http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html)
|
||||
'''
|
||||
- The XML fragments do not need an authentication cookie, this is injected by the module automatically.
|
||||
- The Cisco IMC XML output is being translated to JSON using the Cobra convention.
|
||||
- Any configConfMo change requested has a return status of C(modified), even if there was no actual change from the previous
|
||||
configuration. As a result, this module will always report a change on subsequent runs. In case this behaviour is fixed
|
||||
in a future update to Cisco IMC, this module will automatically adapt.
|
||||
- If you get a C(Connection failure) related to C(The read operation timed out) increase the O(timeout) parameter. Some
|
||||
XML fragments can take longer than the default timeout.
|
||||
- More information about the IMC REST API is available from
|
||||
U(http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html).
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Power down server
|
||||
community.general.imc_rest:
|
||||
hostname: '{{ imc_hostname }}'
|
||||
|
@ -190,11 +188,11 @@ EXAMPLES = r'''
|
|||
<commHttps dn="sys/svc-ext/https-svc" adminState="enabled" sessionTimeout="10800"/>
|
||||
</inConfig></configConfMo>
|
||||
delegate_to: localhost
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
aaLogin:
|
||||
description: Cisco IMC XML output for the login, translated to JSON using Cobra convention
|
||||
description: Cisco IMC XML output for the login, translated to JSON using Cobra convention.
|
||||
returned: success
|
||||
type: dict
|
||||
sample: |
|
||||
|
@ -208,27 +206,27 @@ aaLogin:
|
|||
"response": "yes"
|
||||
}
|
||||
configConfMo:
|
||||
description: Cisco IMC XML output for any configConfMo XML fragments, translated to JSON using Cobra convention
|
||||
description: Cisco IMC XML output for any configConfMo XML fragments, translated to JSON using Cobra convention.
|
||||
returned: success
|
||||
type: dict
|
||||
sample: |
|
||||
elapsed:
|
||||
description: Elapsed time in seconds
|
||||
description: Elapsed time in seconds.
|
||||
returned: always
|
||||
type: int
|
||||
sample: 31
|
||||
response:
|
||||
description: HTTP response message, including content length
|
||||
description: HTTP response message, including content length.
|
||||
returned: always
|
||||
type: str
|
||||
sample: OK (729 bytes)
|
||||
status:
|
||||
description: The HTTP response status code
|
||||
description: The HTTP response status code.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: 200
|
||||
error:
|
||||
description: Cisco IMC XML error output for last request, translated to JSON using Cobra convention
|
||||
description: Cisco IMC XML error output for last request, translated to JSON using Cobra convention.
|
||||
returned: failed
|
||||
type: dict
|
||||
sample: |
|
||||
|
@ -240,24 +238,24 @@ error:
|
|||
"response": "yes"
|
||||
}
|
||||
error_code:
|
||||
description: Cisco IMC error code
|
||||
description: Cisco IMC error code.
|
||||
returned: failed
|
||||
type: str
|
||||
sample: ERR-xml-parse-error
|
||||
error_text:
|
||||
description: Cisco IMC error message
|
||||
description: Cisco IMC error message.
|
||||
returned: failed
|
||||
type: str
|
||||
sample: |
|
||||
XML PARSING ERROR: Element 'computeRackUnit', attribute 'admin_Power': The attribute 'admin_Power' is not allowed.
|
||||
input:
|
||||
description: RAW XML input sent to the Cisco IMC, causing the error
|
||||
description: RAW XML input sent to the Cisco IMC, causing the error.
|
||||
returned: failed
|
||||
type: str
|
||||
sample: |
|
||||
<configConfMo><inConfig><computeRackUnit dn="sys/rack-unit-1" admin_Power="down"/></inConfig></configConfMo>
|
||||
output:
|
||||
description: RAW XML output received from the Cisco IMC, with error details
|
||||
description: RAW XML output received from the Cisco IMC, with error details.
|
||||
returned: failed
|
||||
type: str
|
||||
sample: >
|
||||
|
@ -266,7 +264,7 @@ output:
|
|||
errorCode="ERR-xml-parse-error"
|
||||
invocationResult="594"
|
||||
errorDescr="XML PARSING ERROR: Element 'computeRackUnit', attribute 'admin_Power': The attribute 'admin_Power' is not allowed.\n"/>
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
import traceback
|
||||
|
|
|
@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: imgadm
|
||||
short_description: Manage SmartOS images
|
||||
description:
|
||||
- Manage SmartOS virtual machine images through imgadm(1M)
|
||||
- Manage SmartOS virtual machine images through imgadm(1M).
|
||||
author: Jasper Lievisse Adriaanse (@jasperla)
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -33,7 +32,7 @@ options:
|
|||
required: false
|
||||
default: zones
|
||||
description:
|
||||
- zpool to import to or delete images from.
|
||||
- The zpool to import to or delete images from.
|
||||
type: str
|
||||
source:
|
||||
required: false
|
||||
|
@ -42,16 +41,15 @@ options:
|
|||
type: str
|
||||
state:
|
||||
required: true
|
||||
choices: [ present, absent, deleted, imported, updated, vacuumed ]
|
||||
choices: [present, absent, deleted, imported, updated, vacuumed]
|
||||
description:
|
||||
- State the object operated on should be in. V(imported) is an alias for
|
||||
for V(present) and V(deleted) for V(absent). When set to V(vacuumed)
|
||||
and O(uuid=*), it will remove all unused images.
|
||||
- State the object operated on should be in. V(imported) is an alias for for V(present) and V(deleted) for V(absent).
|
||||
When set to V(vacuumed) and O(uuid=*), it will remove all unused images.
|
||||
type: str
|
||||
|
||||
type:
|
||||
required: false
|
||||
choices: [ imgapi, docker, dsapi ]
|
||||
choices: [imgapi, docker, dsapi]
|
||||
default: imgapi
|
||||
description:
|
||||
- Type for image sources.
|
||||
|
@ -62,9 +60,9 @@ options:
|
|||
description:
|
||||
- Image UUID. Can either be a full UUID or V(*) for all images.
|
||||
type: str
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Import an image
|
||||
community.general.imgadm:
|
||||
uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
|
||||
|
@ -100,9 +98,9 @@ EXAMPLES = '''
|
|||
community.general.imgadm:
|
||||
source: 'https://docker.io'
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
source:
|
||||
description: Source that is managed.
|
||||
returned: When not managing an image.
|
||||
|
@ -118,7 +116,7 @@ state:
|
|||
returned: success
|
||||
type: str
|
||||
sample: 'present'
|
||||
'''
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
DOCUMENTATION = r"""
|
||||
module: infinity
|
||||
short_description: Manage Infinity IPAM using Rest API
|
||||
description:
|
||||
|
@ -41,10 +41,10 @@ options:
|
|||
required: true
|
||||
action:
|
||||
description:
|
||||
- Action to perform
|
||||
- Action to perform.
|
||||
type: str
|
||||
required: true
|
||||
choices: [add_network, delete_network, get_network, get_network_id, release_ip, release_network, reserve_network, reserve_next_available_ip ]
|
||||
choices: [add_network, delete_network, get_network, get_network_id, release_ip, release_network, reserve_network, reserve_next_available_ip]
|
||||
network_id:
|
||||
description:
|
||||
- Network ID.
|
||||
|
@ -55,11 +55,11 @@ options:
|
|||
type: str
|
||||
network_address:
|
||||
description:
|
||||
- Network address with CIDR format (e.g., 192.168.310.0).
|
||||
- Network address with CIDR format (for example V(192.168.310.0)).
|
||||
type: str
|
||||
network_size:
|
||||
description:
|
||||
- Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26).
|
||||
- Network bitmask (for example V(255.255.255.220) or CIDR format V(/26)).
|
||||
type: str
|
||||
network_name:
|
||||
description:
|
||||
|
@ -72,20 +72,19 @@ options:
|
|||
default: -1
|
||||
network_type:
|
||||
description:
|
||||
- Network type defined by Infinity
|
||||
- Network type defined by Infinity.
|
||||
type: str
|
||||
choices: [ lan, shared_lan, supernet ]
|
||||
choices: [lan, shared_lan, supernet]
|
||||
default: lan
|
||||
network_family:
|
||||
description:
|
||||
- Network family defined by Infinity, e.g. IPv4, IPv6 and Dual stack
|
||||
- Network family defined by Infinity, for example V(IPv4), V(IPv6) and V(Dual stack).
|
||||
type: str
|
||||
choices: [ '4', '6', dual ]
|
||||
choices: ['4', '6', dual]
|
||||
default: '4'
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
---
|
||||
EXAMPLES = r"""
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
strategy: debug
|
||||
|
@ -102,16 +101,16 @@ EXAMPLES = r'''
|
|||
network_id: 1201
|
||||
network_size: /28
|
||||
register: infinity
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
network_id:
|
||||
description: id for a given network
|
||||
description: Id for a given network.
|
||||
returned: success
|
||||
type: str
|
||||
sample: '1501'
|
||||
ip_info:
|
||||
description: when reserve next available ip address from a network, the ip address info ) is returned.
|
||||
description: When reserve next available ip address from a network, the ip address info ) is returned.
|
||||
returned: success
|
||||
type: str
|
||||
sample: '{"address": "192.168.10.3", "hostname": "", "FQDN": "", "domainname": "", "id": 3229}'
|
||||
|
@ -130,7 +129,7 @@ network_info:
|
|||
"network_type": "lan",
|
||||
"network_name": "'reserve_new_ansible_network'"
|
||||
}
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, json
|
||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: influxdb_database
|
||||
short_description: Manage InfluxDB databases
|
||||
description:
|
||||
|
@ -33,16 +32,15 @@ options:
|
|||
state:
|
||||
description:
|
||||
- Determines if the database should be created or destroyed.
|
||||
choices: [ absent, present ]
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
type: str
|
||||
extends_documentation_fragment:
|
||||
- community.general.influxdb
|
||||
- community.general.attributes
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
# Example influxdb_database command from Ansible Playbooks
|
||||
- name: Create database
|
||||
community.general.influxdb_database:
|
||||
|
@ -63,11 +61,11 @@ EXAMPLES = r'''
|
|||
database_name: "{{influxdb_database_name}}"
|
||||
ssl: true
|
||||
validate_certs: true
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
# only defaults
|
||||
'''
|
||||
"""
|
||||
|
||||
try:
|
||||
import requests.exceptions
|
||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: influxdb_query
|
||||
short_description: Query data points from InfluxDB
|
||||
description:
|
||||
|
@ -36,10 +35,9 @@ options:
|
|||
extends_documentation_fragment:
|
||||
- community.general.influxdb
|
||||
- community.general.attributes
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Query connections
|
||||
community.general.influxdb_query:
|
||||
hostname: "{{ influxdb_ip_address }}"
|
||||
|
@ -57,17 +55,17 @@ EXAMPLES = r'''
|
|||
- name: Print results from the query
|
||||
ansible.builtin.debug:
|
||||
var: connection.query_results
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
query_results:
|
||||
description: Result from the query
|
||||
description: Result from the query.
|
||||
returned: success
|
||||
type: list
|
||||
sample:
|
||||
- mean: 1245.5333333333333
|
||||
time: "1970-01-01T00:00:00Z"
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: influxdb_retention_policy
|
||||
short_description: Manage InfluxDB retention policies
|
||||
description:
|
||||
|
@ -38,15 +37,14 @@ options:
|
|||
state:
|
||||
description:
|
||||
- State of the retention policy.
|
||||
choices: [ absent, present ]
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
type: str
|
||||
version_added: 3.1.0
|
||||
duration:
|
||||
description:
|
||||
- Determines how long InfluxDB should keep the data. If specified, it
|
||||
should be V(INF) or at least one hour. If not specified, V(INF) is
|
||||
assumed. Supports complex duration expressions with multiple units.
|
||||
- Determines how long InfluxDB should keep the data. If specified, it should be V(INF) or at least one hour. If not
|
||||
specified, V(INF) is assumed. Supports complex duration expressions with multiple units.
|
||||
- Required only if O(state) is set to V(present).
|
||||
type: str
|
||||
replication:
|
||||
|
@ -61,19 +59,16 @@ options:
|
|||
default: false
|
||||
shard_group_duration:
|
||||
description:
|
||||
- Determines the time range covered by a shard group. If specified it
|
||||
must be at least one hour. If none, it's determined by InfluxDB by
|
||||
the rentention policy's duration. Supports complex duration expressions
|
||||
with multiple units.
|
||||
- Determines the time range covered by a shard group. If specified it must be at least one hour. If none, it's determined
|
||||
by InfluxDB by the rentention policy's duration. Supports complex duration expressions with multiple units.
|
||||
type: str
|
||||
version_added: '2.0.0'
|
||||
extends_documentation_fragment:
|
||||
- community.general.influxdb
|
||||
- community.general.attributes
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
# Example influxdb_retention_policy command from Ansible Playbooks
|
||||
- name: Create 1 hour retention policy
|
||||
community.general.influxdb_retention_policy:
|
||||
|
@ -134,11 +129,11 @@ EXAMPLES = r'''
|
|||
database_name: "{{ influxdb_database_name }}"
|
||||
policy_name: test
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
# only defaults
|
||||
'''
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
|
|||
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: influxdb_user
|
||||
short_description: Manage InfluxDB users
|
||||
description:
|
||||
|
@ -44,7 +43,7 @@ options:
|
|||
state:
|
||||
description:
|
||||
- State of the user.
|
||||
choices: [ absent, present ]
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
type: str
|
||||
grants:
|
||||
|
@ -58,10 +57,9 @@ options:
|
|||
extends_documentation_fragment:
|
||||
- community.general.influxdb
|
||||
- community.general.attributes
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Create a user on localhost using default login credentials
|
||||
community.general.influxdb_user:
|
||||
user_name: john
|
||||
|
@ -101,11 +99,11 @@ EXAMPLES = r'''
|
|||
login_username: "{{ influxdb_username }}"
|
||||
login_password: "{{ influxdb_password }}"
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
#only defaults
|
||||
'''
|
||||
"""
|
||||
|
||||
import json
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: influxdb_write
|
||||
short_description: Write data points into InfluxDB
|
||||
description:
|
||||
|
@ -37,10 +36,9 @@ options:
|
|||
extends_documentation_fragment:
|
||||
- community.general.influxdb
|
||||
- community.general.attributes
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Write points into database
|
||||
community.general.influxdb_write:
|
||||
hostname: "{{influxdb_ip_address}}"
|
||||
|
@ -60,11 +58,11 @@ EXAMPLES = r'''
|
|||
time: "{{ ansible_date_time.iso8601 }}"
|
||||
fields:
|
||||
value: 3000
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
# only defaults
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
|
|
@ -12,19 +12,18 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ini_file
|
||||
short_description: Tweak settings in INI files
|
||||
extends_documentation_fragment:
|
||||
- files
|
||||
- community.general.attributes
|
||||
description:
|
||||
- Manage (add, remove, change) individual settings in an INI-style file without having
|
||||
to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble).
|
||||
- Adds missing sections if they don't exist.
|
||||
- This module adds missing ending newlines to files to keep in line with the POSIX standard, even when
|
||||
no other modifications need to be applied.
|
||||
- Manage (add, remove, change) individual settings in an INI-style file without having to manage the file as a whole with,
|
||||
say, M(ansible.builtin.template) or M(ansible.builtin.assemble).
|
||||
- Adds missing sections if they do not exist.
|
||||
- This module adds missing ending newlines to files to keep in line with the POSIX standard, even when no other modifications
|
||||
need to be applied.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: full
|
||||
|
@ -36,11 +35,10 @@ options:
|
|||
- Path to the INI-style file; this file is created if required.
|
||||
type: path
|
||||
required: true
|
||||
aliases: [ dest ]
|
||||
aliases: [dest]
|
||||
section:
|
||||
description:
|
||||
- Section name in INI file. This is added if O(state=present) automatically when
|
||||
a single value is being set.
|
||||
- Section name in INI file. This is added if O(state=present) automatically when a single value is being set.
|
||||
- If being omitted, the O(option) will be placed before the first O(section).
|
||||
- Omitting O(section) is also required if the config format does not support sections.
|
||||
type: str
|
||||
|
@ -91,28 +89,27 @@ options:
|
|||
version_added: 3.6.0
|
||||
backup:
|
||||
description:
|
||||
- Create a backup file including the timestamp information so you can get
|
||||
the original file back if you somehow clobbered it incorrectly.
|
||||
- Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered
|
||||
it incorrectly.
|
||||
type: bool
|
||||
default: false
|
||||
state:
|
||||
description:
|
||||
- If set to V(absent) and O(exclusive) set to V(true) all matching O(option) lines are removed.
|
||||
- If set to V(absent) and O(exclusive) set to V(false) the specified O(option=value) lines are removed,
|
||||
but the other O(option)s with the same name are not touched.
|
||||
- If set to V(present) and O(exclusive) set to V(false) the specified O(option=values) lines are added,
|
||||
but the other O(option)s with the same name are not touched.
|
||||
- If set to V(present) and O(exclusive) set to V(true) all given O(option=values) lines will be
|
||||
added and the other O(option)s with the same name are removed.
|
||||
- If set to V(absent) and O(exclusive) set to V(false) the specified O(option=value) lines are removed, but the other
|
||||
O(option)s with the same name are not touched.
|
||||
- If set to V(present) and O(exclusive) set to V(false) the specified O(option=values) lines are added, but the other
|
||||
O(option)s with the same name are not touched.
|
||||
- If set to V(present) and O(exclusive) set to V(true) all given O(option=values) lines will be added and the other
|
||||
O(option)s with the same name are removed.
|
||||
type: str
|
||||
choices: [ absent, present ]
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
exclusive:
|
||||
description:
|
||||
- If set to V(true) (default), all matching O(option) lines are removed when O(state=absent),
|
||||
or replaced when O(state=present).
|
||||
- If set to V(false), only the specified O(value)/O(values) are added when O(state=present),
|
||||
or removed when O(state=absent), and existing ones are not modified.
|
||||
- If set to V(true) (default), all matching O(option) lines are removed when O(state=absent), or replaced when O(state=present).
|
||||
- If set to V(false), only the specified O(value)/O(values) are added when O(state=present), or removed when O(state=absent),
|
||||
and existing ones are not modified.
|
||||
type: bool
|
||||
default: true
|
||||
version_added: 3.6.0
|
||||
|
@ -141,8 +138,8 @@ options:
|
|||
modify_inactive_option:
|
||||
description:
|
||||
- By default the module replaces a commented line that matches the given option.
|
||||
- Set this option to V(false) to avoid this. This is useful when you want to keep commented example
|
||||
C(key=value) pairs for documentation purposes.
|
||||
- Set this option to V(false) to avoid this. This is useful when you want to keep commented example C(key=value) pairs
|
||||
for documentation purposes.
|
||||
type: bool
|
||||
default: true
|
||||
version_added: 8.0.0
|
||||
|
@ -159,9 +156,9 @@ notes:
|
|||
author:
|
||||
- Jan-Piet Mens (@jpmens)
|
||||
- Ales Nosek (@noseka1)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Ensure "fav=lemonade is in section "[drinks]" in specified file
|
||||
community.general.ini_file:
|
||||
path: /etc/conf
|
||||
|
@ -257,7 +254,7 @@ EXAMPLES = r'''
|
|||
value: xxxxxxxxxxxxxxxxxxxx
|
||||
mode: '0600'
|
||||
state: present
|
||||
'''
|
||||
"""
|
||||
|
||||
import io
|
||||
import os
|
||||
|
|
|
@ -8,14 +8,13 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: installp
|
||||
author:
|
||||
- Kairo Araujo (@kairoaraujo)
|
||||
short_description: Manage packages on AIX
|
||||
description:
|
||||
- Manage packages using 'installp' on AIX
|
||||
- Manage packages using 'installp' on AIX.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -36,7 +35,7 @@ options:
|
|||
type: list
|
||||
elements: str
|
||||
required: true
|
||||
aliases: [ pkg ]
|
||||
aliases: [pkg]
|
||||
repository_path:
|
||||
description:
|
||||
- Path with AIX packages (required to install).
|
||||
|
@ -45,13 +44,13 @@ options:
|
|||
description:
|
||||
- Whether the package needs to be present on or absent from the system.
|
||||
type: str
|
||||
choices: [ absent, present ]
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
notes:
|
||||
- If the package is already installed, even the package/fileset is new, the module will not install it.
|
||||
'''
|
||||
- If the package is already installed, even the package/fileset is new, the module will not install it.
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Install package foo
|
||||
community.general.installp:
|
||||
name: foo
|
||||
|
@ -84,9 +83,9 @@ EXAMPLES = r'''
|
|||
community.general.installp:
|
||||
name: bos.sysmgt.nim.master
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r''' # '''
|
||||
RETURN = r""" # """
|
||||
|
||||
import os
|
||||
import re
|
||||
|
|
|
@ -9,16 +9,15 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: interfaces_file
|
||||
short_description: Tweak settings in C(/etc/network/interfaces) files
|
||||
extends_documentation_fragment:
|
||||
- ansible.builtin.files
|
||||
- community.general.attributes
|
||||
description:
|
||||
- Manage (add, remove, change) individual interface options in an interfaces-style file without having
|
||||
to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). Interface has to be presented in a file.
|
||||
- Manage (add, remove, change) individual interface options in an interfaces-style file without having to manage the file
|
||||
as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). Interface has to be presented in a file.
|
||||
- Read information about interfaces from interfaces-styled files.
|
||||
attributes:
|
||||
check_mode:
|
||||
|
@ -46,14 +45,14 @@ options:
|
|||
value:
|
||||
type: str
|
||||
description:
|
||||
- If O(option) is not presented for the O(iface) and O(state) is V(present) option will be added.
|
||||
If O(option) already exists and is not V(pre-up), V(up), V(post-up) or V(down), it's value will be updated.
|
||||
V(pre-up), V(up), V(post-up) and V(down) options cannot be updated, only adding new options, removing existing
|
||||
ones or cleaning the whole option set are supported.
|
||||
- If O(option) is not presented for the O(iface) and O(state) is V(present) option will be added. If O(option) already
|
||||
exists and is not V(pre-up), V(up), V(post-up) or V(down), it's value will be updated. V(pre-up), V(up), V(post-up)
|
||||
and V(down) options cannot be updated, only adding new options, removing existing ones or cleaning the whole option
|
||||
set are supported.
|
||||
backup:
|
||||
description:
|
||||
- Create a backup file including the timestamp information so you can get
|
||||
the original file back if you somehow clobbered it incorrectly.
|
||||
- Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered
|
||||
it incorrectly.
|
||||
type: bool
|
||||
default: false
|
||||
state:
|
||||
|
@ -61,15 +60,15 @@ options:
|
|||
description:
|
||||
- If set to V(absent) the option or section will be removed if present instead of created.
|
||||
default: "present"
|
||||
choices: [ "present", "absent" ]
|
||||
choices: ["present", "absent"]
|
||||
|
||||
notes:
|
||||
- If option is defined multiple times last one will be updated but all will be deleted in case of an absent state.
|
||||
requirements: []
|
||||
author: "Roman Belyakovsky (@hryamzik)"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
dest:
|
||||
description: Destination file/path.
|
||||
returned: success
|
||||
|
@ -137,10 +136,9 @@ ifaces:
|
|||
sample:
|
||||
- "route del -net 10.10.10.0/24 gw 10.10.10.1 dev eth1"
|
||||
- "route del -net 10.10.11.0/24 gw 10.10.11.1 dev eth2"
|
||||
...
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Set eth1 mtu configuration value to 8000
|
||||
community.general.interfaces_file:
|
||||
dest: /etc/network/interfaces.d/eth1.cfg
|
||||
|
@ -150,7 +148,7 @@ EXAMPLES = '''
|
|||
backup: true
|
||||
state: present
|
||||
register: eth1_cfg
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
|
|
Loading…
Reference in New Issue