[PR #9309/b57fef20 backport][stable-9] [vw]*: adjust docs (#9325)

[vw]*: adjust docs (#9309)

[vm]*: adjust docs

(cherry picked from commit b57fef201e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pull/9345/head
patchback[bot] 2024-12-23 12:22:42 +01:00 committed by GitHub
parent 3dd1c9d64a
commit 19b6f9ef3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 353 additions and 507 deletions

View File

@ -8,10 +8,9 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
author: author:
- Bryan Gurney (@bgurney-rh) - Bryan Gurney (@bgurney-rh)
module: vdo module: vdo
@ -19,277 +18,189 @@ short_description: Module to control VDO
description: description:
- This module controls the VDO dedupe and compression device. - This module controls the VDO dedupe and compression device.
- VDO, or Virtual Data Optimizer, is a device-mapper target that - VDO, or Virtual Data Optimizer, is a device-mapper target that provides inline block-level deduplication, compression, and thin provisioning
provides inline block-level deduplication, compression, and capabilities to primary storage.
thin provisioning capabilities to primary storage.
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:
- The name of the VDO volume. - The name of the VDO volume.
type: str type: str
required: true required: true
state: state:
description: description:
- Whether this VDO volume should be "present" or "absent". - Whether this VDO volume should be V(present) or V(absent). If a V(present) VDO volume does not exist, it will be created. If a V(present)
If a "present" VDO volume does not exist, it will be VDO volume already exists, it will be modified, by updating the configuration, which will take effect when the VDO volume is restarted.
created. If a "present" VDO volume already exists, it Not all parameters of an existing VDO volume can be modified; the C(statusparamkeys) list in the code contains the parameters that can
will be modified, by updating the configuration, which be modified after creation. If an V(absent) VDO volume does not exist, it will not be removed.
will take effect when the VDO volume is restarted. type: str
Not all parameters of an existing VDO volume can be choices: [absent, present]
modified; the "statusparamkeys" list contains the default: present
parameters that can be modified after creation. If an activated:
"absent" VDO volume does not exist, it will not be description:
removed. - The C(activate) status for a VDO volume. If this is set to V(false), the VDO volume cannot be started, and it will not start on system
type: str startup. However, on initial creation, a VDO volume with "activated" set to "off" will be running, until stopped. This is the default
choices: [ absent, present ] behavior of the C(vdo create) command; it provides the user an opportunity to write a base amount of metadata (filesystem, LVM headers,
default: present etc.) to the VDO volume prior to stopping the volume, and leaving it deactivated until ready to use.
activated: type: bool
description: running:
- The "activate" status for a VDO volume. If this is set description:
to V(false), the VDO volume cannot be started, and it will - Whether this VDO volume is running.
not start on system startup. However, on initial - A VDO volume must be activated in order to be started.
creation, a VDO volume with "activated" set to "off" type: bool
will be running, until stopped. This is the default device:
behavior of the "vdo create" command; it provides the description:
user an opportunity to write a base amount of metadata - The full path of the device to use for VDO storage.
(filesystem, LVM headers, etc.) to the VDO volume prior - This is required if O(state=present).
to stopping the volume, and leaving it deactivated type: str
until ready to use. logicalsize:
type: bool description:
running: - The logical size of the VDO volume (in megabytes, or LVM suffix format). If not specified for a new volume, this defaults to the same
description: size as the underlying storage device, which is specified in the O(device) parameter. Existing volumes will maintain their size if the
- Whether this VDO volume is running. logicalsize parameter is not specified, or is smaller than or identical to the current size. If the specified size is larger than the
- A VDO volume must be activated in order to be started. current size, a C(growlogical) operation will be performed.
type: bool type: str
device: deduplication:
description: description:
- The full path of the device to use for VDO storage. - Configures whether deduplication is enabled. The default for a created volume is V(enabled). Existing volumes will maintain their previously
- This is required if "state" is "present". configured setting unless a different value is specified in the playbook.
type: str type: str
logicalsize: choices: [disabled, enabled]
description: compression:
- The logical size of the VDO volume (in megabytes, or description:
LVM suffix format). If not specified for a new volume, - Configures whether compression is enabled. The default for a created volume is V(enabled). Existing volumes will maintain their previously
this defaults to the same size as the underlying storage configured setting unless a different value is specified in the playbook.
device, which is specified in the 'device' parameter. type: str
Existing volumes will maintain their size if the choices: [disabled, enabled]
logicalsize parameter is not specified, or is smaller blockmapcachesize:
than or identical to the current size. If the specified description:
size is larger than the current size, a growlogical - The amount of memory allocated for caching block map pages, in megabytes (or may be issued with an LVM-style suffix of K, M, G, or T).
operation will be performed. The default (and minimum) value is V(128M). The value specifies the size of the cache; there is a 15% memory usage overhead. Each 1.25G
type: str of block map covers 1T of logical blocks, therefore a small amount of block map cache memory can cache a significantly large amount of
deduplication: block map data.
description: - Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook.
- Configures whether deduplication is enabled. The type: str
default for a created volume is 'enabled'. Existing readcache:
volumes will maintain their previously configured description:
setting unless a different value is specified in the - Enables or disables the read cache. The default is V(disabled). Choosing V(enabled) enables a read cache which may improve performance
playbook. for workloads of high deduplication, read workloads with a high level of compression, or on hard disk storage. Existing volumes will maintain
type: str their previously configured setting unless a different value is specified in the playbook.
choices: [ disabled, enabled ] - The read cache feature is available in VDO 6.1 and older.
compression: type: str
description: choices: [disabled, enabled]
- Configures whether compression is enabled. The default readcachesize:
for a created volume is 'enabled'. Existing volumes description:
will maintain their previously configured setting unless - Specifies the extra VDO device read cache size in megabytes. This is in addition to a system-defined minimum. Using a value with a suffix
a different value is specified in the playbook. of K, M, G, or T is optional. The default value is V(0). 1.125 MB of memory per bio thread will be used per 1 MB of read cache specified
type: str (for example, a VDO volume configured with 4 bio threads will have a read cache memory usage overhead of 4.5 MB per 1 MB of read cache
choices: [ disabled, enabled ] specified). Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook.
blockmapcachesize: - The read cache feature is available in VDO 6.1 and older.
description: type: str
- The amount of memory allocated for caching block map emulate512:
pages, in megabytes (or may be issued with an LVM-style description:
suffix of K, M, G, or T). The default (and minimum) - Enables 512-byte emulation mode, allowing drivers or filesystems to access the VDO volume at 512-byte granularity, instead of the default
value is 128M. The value specifies the size of the 4096-byte granularity.
cache; there is a 15% memory usage overhead. Each 1.25G - Only recommended when a driver or filesystem requires 512-byte sector level access to a device.
of block map covers 1T of logical blocks, therefore a - This option is only available when creating a new volume, and cannot be changed for an existing volume.
small amount of block map cache memory can cache a type: bool
significantly large amount of block map data. Existing default: false
volumes will maintain their previously configured growphysical:
setting unless a different value is specified in the description:
playbook. - Specifies whether to attempt to execute a C(growphysical) operation, if there is enough unused space on the device. A C(growphysical)
type: str operation will be executed if there is at least 64 GB of free space, relative to the previous physical size of the affected VDO volume.
readcache: type: bool
description: default: false
- Enables or disables the read cache. The default is slabsize:
'disabled'. Choosing 'enabled' enables a read cache description:
which may improve performance for workloads of high - The size of the increment by which the physical size of a VDO volume is grown, in megabytes (or may be issued with an LVM-style suffix
deduplication, read workloads with a high level of of K, M, G, or T). Must be a power of two between 128M and 32G. The default is V(2G), which supports volumes having a physical size up
compression, or on hard disk storage. Existing to 16T. The maximum, V(32G), supports a physical size of up to 256T. This option is only available when creating a new volume, and cannot
volumes will maintain their previously configured be changed for an existing volume.
setting unless a different value is specified in the type: str
playbook. writepolicy:
- The read cache feature is available in VDO 6.1 and older. description:
type: str - Specifies the write policy of the VDO volume.
choices: [ disabled, enabled ] - The V(sync) mode acknowledges writes only after data is on stable storage.
readcachesize: - The V(async) mode acknowledges writes when data has been cached for writing to stable storage.
description: - The default (and highly recommended) V(auto) mode checks the storage device to determine whether it supports flushes. Devices that support
- Specifies the extra VDO device read cache size in flushes will result in a VDO volume in V(async) mode, while devices that do not support flushes will run in V(sync) mode.
megabytes. This is in addition to a system-defined - Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook.
minimum. Using a value with a suffix of K, M, G, or T type: str
is optional. The default value is 0. 1.125 MB of choices: [async, auto, sync]
memory per bio thread will be used per 1 MB of read indexmem:
cache specified (for example, a VDO volume configured description:
with 4 bio threads will have a read cache memory usage - Specifies the amount of index memory in gigabytes. The default is V(0.25). The special decimal values V(0.25), V(0.5), and V(0.75) can
overhead of 4.5 MB per 1 MB of read cache specified). be used, as can any positive integer. This option is only available when creating a new volume, and cannot be changed for an existing
Existing volumes will maintain their previously volume.
configured setting unless a different value is specified type: str
in the playbook. indexmode:
- The read cache feature is available in VDO 6.1 and older. description:
type: str - Specifies the index mode of the Albireo index.
emulate512: - The default is V(dense), which has a deduplication window of 1 GB of index memory per 1 TB of incoming data, requiring 10 GB of index
description: data on persistent storage.
- Enables 512-byte emulation mode, allowing drivers or - The V(sparse) mode has a deduplication window of 1 GB of index memory per 10 TB of incoming data, but requires 100 GB of index data on
filesystems to access the VDO volume at 512-byte persistent storage.
granularity, instead of the default 4096-byte granularity. - This option is only available when creating a new volume, and cannot be changed for an existing volume.
Default is 'disabled'; only recommended when a driver type: str
or filesystem requires 512-byte sector level access to choices: [dense, sparse]
a device. This option is only available when creating ackthreads:
a new volume, and cannot be changed for an existing description:
volume. - Specifies the number of threads to use for acknowledging completion of requested VDO I/O operations. Valid values are integer values from
type: bool V(1) to V(100) (lower numbers are preferable due to overhead). The default is V(1). Existing volumes will maintain their previously configured
default: false setting unless a different value is specified in the playbook.
growphysical: type: str
description: biothreads:
- Specifies whether to attempt to execute a growphysical description:
operation, if there is enough unused space on the - Specifies the number of threads to use for submitting I/O operations to the storage device. Valid values are integer values from V(1)
device. A growphysical operation will be executed if to V(100) (lower numbers are preferable due to overhead). The default is V(4). Existing volumes will maintain their previously configured
there is at least 64 GB of free space, relative to the setting unless a different value is specified in the playbook.
previous physical size of the affected VDO volume. type: str
type: bool cputhreads:
default: false description:
slabsize: - Specifies the number of threads to use for CPU-intensive work such as hashing or compression. Valid values are integer values from V(1)
description: to V(100) (lower numbers are preferable due to overhead). The default is V(2). Existing volumes will maintain their previously configured
- The size of the increment by which the physical size of setting unless a different value is specified in the playbook.
a VDO volume is grown, in megabytes (or may be issued type: str
with an LVM-style suffix of K, M, G, or T). Must be a logicalthreads:
power of two between 128M and 32G. The default is 2G, description:
which supports volumes having a physical size up to 16T. - Specifies the number of threads across which to subdivide parts of the VDO processing based on logical block addresses. Valid values are
The maximum, 32G, supports a physical size of up to 256T. integer values from V(1) to V(100) (lower numbers are preferable due to overhead). The default is V(1). Existing volumes will maintain
This option is only available when creating a new their previously configured setting unless a different value is specified in the playbook.
volume, and cannot be changed for an existing volume. type: str
type: str physicalthreads:
writepolicy: description:
description: - Specifies the number of threads across which to subdivide parts of the VDO processing based on physical block addresses. Valid values
- Specifies the write policy of the VDO volume. The are integer values from V(1) to V(16) (lower numbers are preferable due to overhead). The physical space used by the VDO volume must be
'sync' mode acknowledges writes only after data is on larger than (O(slabsize) * O(physicalthreads)). The default is V(1). Existing volumes will maintain their previously configured setting
stable storage. The 'async' mode acknowledges writes unless a different value is specified in the playbook.
when data has been cached for writing to stable type: str
storage. The default (and highly recommended) 'auto' force:
mode checks the storage device to determine whether it description:
supports flushes. Devices that support flushes will - When creating a volume, ignores any existing file system or VDO signature already present in the storage device. When stopping or removing
result in a VDO volume in 'async' mode, while devices a VDO volume, first unmounts the file system stored on the device if mounted.
that do not support flushes will run in sync mode. - B(Warning:) Since this parameter removes all safety checks it is important to make sure that all parameters provided are accurate and
Existing volumes will maintain their previously intentional.
configured setting unless a different value is type: bool
specified in the playbook. default: false
type: str version_added: 2.4.0
choices: [ async, auto, sync ]
indexmem:
description:
- Specifies the amount of index memory in gigabytes. The
default is 0.25. The special decimal values 0.25, 0.5,
and 0.75 can be used, as can any positive integer.
This option is only available when creating a new
volume, and cannot be changed for an existing volume.
type: str
indexmode:
description:
- Specifies the index mode of the Albireo index. The
default is 'dense', which has a deduplication window of
1 GB of index memory per 1 TB of incoming data,
requiring 10 GB of index data on persistent storage.
The 'sparse' mode has a deduplication window of 1 GB of
index memory per 10 TB of incoming data, but requires
100 GB of index data on persistent storage. This option
is only available when creating a new volume, and cannot
be changed for an existing volume.
type: str
choices: [ dense, sparse ]
ackthreads:
description:
- Specifies the number of threads to use for
acknowledging completion of requested VDO I/O operations.
Valid values are integer values from 1 to 100 (lower
numbers are preferable due to overhead). The default is
1. Existing volumes will maintain their previously
configured setting unless a different value is specified
in the playbook.
type: str
biothreads:
description:
- Specifies the number of threads to use for submitting I/O
operations to the storage device. Valid values are
integer values from 1 to 100 (lower numbers are
preferable due to overhead). The default is 4.
Existing volumes will maintain their previously
configured setting unless a different value is specified
in the playbook.
type: str
cputhreads:
description:
- Specifies the number of threads to use for CPU-intensive
work such as hashing or compression. Valid values are
integer values from 1 to 100 (lower numbers are
preferable due to overhead). The default is 2.
Existing volumes will maintain their previously
configured setting unless a different value is specified
in the playbook.
type: str
logicalthreads:
description:
- Specifies the number of threads across which to
subdivide parts of the VDO processing based on logical
block addresses. Valid values are integer values from
1 to 100 (lower numbers are preferable due to overhead).
The default is 1. Existing volumes will maintain their
previously configured setting unless a different value
is specified in the playbook.
type: str
physicalthreads:
description:
- Specifies the number of threads across which to
subdivide parts of the VDO processing based on physical
block addresses. Valid values are integer values from
1 to 16 (lower numbers are preferable due to overhead).
The physical space used by the VDO volume must be
larger than (slabsize * physicalthreads). The default
is 1. Existing volumes will maintain their previously
configured setting unless a different value is specified
in the playbook.
type: str
force:
description:
- When creating a volume, ignores any existing file system
or VDO signature already present in the storage device.
When stopping or removing a VDO volume, first unmounts
the file system stored on the device if mounted.
- "B(Warning:) Since this parameter removes all safety
checks it is important to make sure that all parameters
provided are accurate and intentional."
type: bool
default: false
version_added: 2.4.0
notes: notes:
- In general, the default thread configuration should be used. - In general, the default thread configuration should be used.
requirements: requirements:
- PyYAML - PyYAML
- kmod-kvdo - kmod-kvdo
- vdo - vdo
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Create 2 TB VDO volume vdo1 on device /dev/md0 - name: Create 2 TB VDO volume vdo1 on device /dev/md0
community.general.vdo: community.general.vdo:
name: vdo1 name: vdo1
@ -301,9 +212,9 @@ EXAMPLES = r'''
community.general.vdo: community.general.vdo:
name: vdo1 name: vdo1
state: absent state: absent
''' """
RETURN = r'''# ''' RETURN = r"""# """
from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.basic import AnsibleModule, missing_required_lib
import re import re

View File

@ -8,14 +8,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: vertica_configuration module: vertica_configuration
short_description: Updates Vertica configuration parameters short_description: Updates Vertica configuration parameters
description: description:
- Updates Vertica configuration parameters. - Updates Vertica configuration parameters.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
@ -24,51 +23,49 @@ attributes:
options: options:
parameter: parameter:
description: description:
- Name of the parameter to update. - Name of the parameter to update.
required: true required: true
aliases: [name] aliases: [name]
type: str type: str
value: value:
description: description:
- Value of the parameter to be set. - Value of the parameter to be set.
type: str type: str
db: db:
description: description:
- Name of the Vertica database. - Name of the Vertica database.
type: str type: str
cluster: cluster:
description: description:
- Name of the Vertica cluster. - Name of the Vertica cluster.
default: localhost default: localhost
type: str type: str
port: port:
description: description:
- Vertica cluster port to connect to. - Vertica cluster port to connect to.
default: '5433' default: '5433'
type: str type: str
login_user: login_user:
description: description:
- The username used to authenticate with. - The username used to authenticate with.
default: dbadmin default: dbadmin
type: str type: str
login_password: login_password:
description: description:
- The password used to authenticate with. - The password used to authenticate with.
type: str type: str
notes: notes:
- The default authentication assumes that you are either logging in as or sudo'ing - The default authentication assumes that you are either logging in as or sudo'ing to the C(dbadmin) account on the host.
to the C(dbadmin) account on the host. - This module uses C(pyodbc), a Python ODBC database adapter. You must ensure that C(unixODBC) and C(pyodbc) is installed on the host and properly
- This module uses C(pyodbc), a Python ODBC database adapter. You must ensure configured.
that C(unixODBC) and C(pyodbc) is installed on the host and properly configured. - Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) to be added to the C(Vertica) section of either
- Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) to
to be added to the C(Vertica) section of either C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) requirements: ['unixODBC', 'pyodbc']
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: [ 'unixODBC', 'pyodbc' ]
author: "Dariusz Owczarek (@dareko)" author: "Dariusz Owczarek (@dareko)"
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Updating load_balance_policy - name: Updating load_balance_policy
community.general.vertica_configuration: name=failovertostandbyafter value='8 hours' community.general.vertica_configuration: name=failovertostandbyafter value='8 hours'
""" """

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: vertica_info module: vertica_info
short_description: Gathers Vertica database facts short_description: Gathers Vertica database facts
description: description:
@ -25,8 +24,7 @@ options:
default: localhost default: localhost
type: str type: str
port: port:
description: description: Database port to connect to.
Database port to connect to.
default: '5433' default: '5433'
type: str type: str
db: db:
@ -43,19 +41,17 @@ options:
- The password used to authenticate with. - The password used to authenticate with.
type: str type: str
notes: notes:
- The default authentication assumes that you are either logging in as or sudo'ing - The default authentication assumes that you are either logging in as or sudo'ing to the C(dbadmin) account on the host.
to the C(dbadmin) account on the host. - This module uses C(pyodbc), a Python ODBC database adapter. You must ensure that C(unixODBC) and C(pyodbc) are installed on the host and properly
- This module uses C(pyodbc), a Python ODBC database adapter. You must ensure configured.
that C(unixODBC) and C(pyodbc) are installed on the host and properly configured. - Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) to be added to the C(Vertica) section of either
- Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) to
to be added to the C(Vertica) section of either C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) requirements: ['unixODBC', 'pyodbc']
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: [ 'unixODBC', 'pyodbc' ]
author: "Dariusz Owczarek (@dareko)" author: "Dariusz Owczarek (@dareko)"
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Gathering vertica facts - name: Gathering vertica facts
community.general.vertica_info: db=db_name community.general.vertica_info: db=db_name
register: result register: result

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: vertica_role module: vertica_role
short_description: Adds or removes Vertica database roles and assigns roles to them short_description: Adds or removes Vertica database roles and assigns roles to them
description: description:
@ -64,19 +63,17 @@ options:
- The password used to authenticate with. - The password used to authenticate with.
type: str type: str
notes: notes:
- The default authentication assumes that you are either logging in as or sudo'ing - The default authentication assumes that you are either logging in as or sudo'ing to the C(dbadmin) account on the host.
to the C(dbadmin) account on the host. - This module uses C(pyodbc), a Python ODBC database adapter. You must ensure that C(unixODBC) and C(pyodbc) is installed on the host and properly
- This module uses C(pyodbc), a Python ODBC database adapter. You must ensure configured.
that C(unixODBC) and C(pyodbc) is installed on the host and properly configured. - Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) to be added to the C(Vertica) section of either
- Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) to
to be added to the C(Vertica) section of either C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) requirements: ['unixODBC', 'pyodbc']
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: [ 'unixODBC', 'pyodbc' ]
author: "Dariusz Owczarek (@dareko)" author: "Dariusz Owczarek (@dareko)"
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Creating a new vertica role - name: Creating a new vertica role
community.general.vertica_role: name=role_name db=db_name state=present community.general.vertica_role: name=role_name db=db_name state=present

View File

@ -9,17 +9,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: vertica_schema module: vertica_schema
short_description: Adds or removes Vertica database schema and roles short_description: Adds or removes Vertica database schema and roles
description: description:
- Adds or removes Vertica database schema and, optionally, roles - Adds or removes Vertica database schema and, optionally, roles with schema access privileges.
with schema access privileges.
- A schema will not be removed until all the objects have been dropped. - A schema will not be removed until all the objects have been dropped.
- In such a situation, if the module tries to remove the schema it - In such a situation, if the module tries to remove the schema it will fail and only remove roles created for the schema if they have no dependencies.
will fail and only remove roles created for the schema if they have
no dependencies.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -78,19 +74,17 @@ options:
- The password used to authenticate with. - The password used to authenticate with.
type: str type: str
notes: notes:
- The default authentication assumes that you are either logging in as or sudo'ing - The default authentication assumes that you are either logging in as or sudo'ing to the C(dbadmin) account on the host.
to the C(dbadmin) account on the host. - This module uses C(pyodbc), a Python ODBC database adapter. You must ensure that C(unixODBC) and C(pyodbc) is installed on the host and properly
- This module uses C(pyodbc), a Python ODBC database adapter. You must ensure configured.
that C(unixODBC) and C(pyodbc) is installed on the host and properly configured. - Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) to be added to the C(Vertica) section of either
- Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) to
to be added to the C(Vertica) section of either C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) requirements: ['unixODBC', 'pyodbc']
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: [ 'unixODBC', 'pyodbc' ]
author: "Dariusz Owczarek (@dareko)" author: "Dariusz Owczarek (@dareko)"
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Creating a new vertica schema - name: Creating a new vertica schema
community.general.vertica_schema: name=schema_name db=db_name state=present community.general.vertica_schema: name=schema_name db=db_name state=present
@ -98,12 +92,7 @@ EXAMPLES = """
community.general.vertica_schema: name=schema_name owner=dbowner db=db_name state=present community.general.vertica_schema: name=schema_name owner=dbowner db=db_name state=present
- name: Creating a new schema with roles - name: Creating a new schema with roles
community.general.vertica_schema: community.general.vertica_schema: name=schema_name create_roles=schema_name_all usage_roles=schema_name_ro,schema_name_rw db=db_name state=present
name=schema_name
create_roles=schema_name_all
usage_roles=schema_name_ro,schema_name_rw
db=db_name
state=present
""" """
import traceback import traceback

View File

@ -8,15 +8,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: vertica_user module: vertica_user
short_description: Adds or removes Vertica database users and assigns roles short_description: Adds or removes Vertica database users and assigns roles
description: description:
- Adds or removes Vertica database user and, optionally, assigns roles. - Adds or removes Vertica database user and, optionally, assigns roles.
- A user will not be removed until all the dependencies have been dropped. - A user will not be removed until all the dependencies have been dropped.
- In such a situation, if the module tries to remove the user it - In such a situation, if the module tries to remove the user it will fail and only remove roles granted to the user.
will fail and only remove roles granted to the user.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -42,9 +40,8 @@ options:
password: password:
description: description:
- The user's password encrypted by the MD5 algorithm. - The user's password encrypted by the MD5 algorithm.
- The password must be generated with the format C("md5" + md5[password + username]), - The password must be generated with the format C("md5" + md5[password + username]), resulting in a total of 35 characters. An easy way
resulting in a total of 35 characters. An easy way to do this is by querying to do this is by querying the Vertica database with select V('md5'||md5('<user_password><user_name>'\)).
the Vertica database with select V('md5'||md5('<user_password><user_name>'\)).
type: str type: str
expired: expired:
description: description:
@ -90,29 +87,22 @@ options:
- The password used to authenticate with. - The password used to authenticate with.
type: str type: str
notes: notes:
- The default authentication assumes that you are either logging in as or sudo'ing - The default authentication assumes that you are either logging in as or sudo'ing to the C(dbadmin) account on the host.
to the C(dbadmin) account on the host. - This module uses C(pyodbc), a Python ODBC database adapter. You must ensure that C(unixODBC) and C(pyodbc) is installed on the host and properly
- This module uses C(pyodbc), a Python ODBC database adapter. You must ensure configured.
that C(unixODBC) and C(pyodbc) is installed on the host and properly configured. - Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) to be added to the C(Vertica) section of either
- Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so) C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) to
to be added to the C(Vertica) section of either C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini) be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16) requirements: ['unixODBC', 'pyodbc']
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: [ 'unixODBC', 'pyodbc' ]
author: "Dariusz Owczarek (@dareko)" author: "Dariusz Owczarek (@dareko)"
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Creating a new vertica user with password - name: Creating a new vertica user with password
community.general.vertica_user: name=user_name password=md5<encrypted_password> db=db_name state=present community.general.vertica_user: name=user_name password=md5<encrypted_password> db=db_name state=present
- name: Creating a new vertica user authenticated via ldap with roles assigned - name: Creating a new vertica user authenticated via ldap with roles assigned
community.general.vertica_user: community.general.vertica_user: name=user_name ldap=true db=db_name roles=schema_name_ro state=present
name=user_name
ldap=true
db=db_name
roles=schema_name_ro
state=present
""" """
import traceback import traceback

View File

@ -9,15 +9,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: vexata_eg module: vexata_eg
short_description: Manage export groups on Vexata VX100 storage arrays short_description: Manage export groups on Vexata VX100 storage arrays
description: description:
- Create or delete export groups on a Vexata VX100 array. - Create or delete export groups on a Vexata VX100 array.
- An export group is a tuple of a volume group, initiator group and port - An export group is a tuple of a volume group, initiator group and port group that allows a set of volumes to be exposed to one or more hosts
group that allows a set of volumes to be exposed to one or more hosts through specific array ports.
through specific array ports.
author: author:
- Sandeep Kasargod (@vexata) - Sandeep Kasargod (@vexata)
attributes: attributes:
@ -33,29 +31,28 @@ options:
type: str type: str
state: state:
description: description:
- Creates export group when present or delete when absent. - Creates export group when present or delete when absent.
default: present default: present
choices: [ present, absent ] choices: [present, absent]
type: str type: str
vg: vg:
description: description:
- Volume group name. - Volume group name.
type: str type: str
ig: ig:
description: description:
- Initiator group name. - Initiator group name.
type: str type: str
pg: pg:
description: description:
- Port group name. - Port group name.
type: str type: str
extends_documentation_fragment: extends_documentation_fragment:
- community.general.vexata.vx100 - community.general.vexata.vx100
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = r'''
- name: Create export group named db_export. - name: Create export group named db_export.
community.general.vexata_eg: community.general.vexata_eg:
name: db_export name: db_export
@ -74,10 +71,10 @@ EXAMPLES = r'''
array: vx100_ultra.test.com array: vx100_ultra.test.com
user: admin user: admin
password: secret password: secret
''' """
RETURN = r''' RETURN = r"""
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.vexata import ( from ansible_collections.community.general.plugins.module_utils.vexata import (

View File

@ -9,14 +9,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: vexata_volume module: vexata_volume
short_description: Manage volumes on Vexata VX100 storage arrays short_description: Manage volumes on Vexata VX100 storage arrays
description: description:
- Create, deletes or extend volumes on a Vexata VX100 array. - Create, deletes or extend volumes on a Vexata VX100 array.
author: author:
- Sandeep Kasargod (@vexata) - Sandeep Kasargod (@vexata)
attributes: attributes:
check_mode: check_mode:
support: full support: full
@ -32,19 +31,18 @@ options:
description: description:
- Creates/Modifies volume when present or removes when absent. - Creates/Modifies volume when present or removes when absent.
default: present default: present
choices: [ present, absent ] choices: [present, absent]
type: str type: str
size: size:
description: description:
- Volume size in M, G, T units. M=2^20, G=2^30, T=2^40 bytes. - Volume size in M, G, T units. M=2^20, G=2^30, T=2^40 bytes.
type: str type: str
extends_documentation_fragment: extends_documentation_fragment:
- community.general.vexata.vx100 - community.general.vexata.vx100
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = r'''
- name: Create new 2 TiB volume named foo - name: Create new 2 TiB volume named foo
community.general.vexata_volume: community.general.vexata_volume:
name: foo name: foo
@ -70,10 +68,10 @@ EXAMPLES = r'''
array: vx100_ultra.test.com array: vx100_ultra.test.com
user: admin user: admin
password: secret password: secret
''' """
RETURN = r''' RETURN = r"""
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.vexata import ( from ansible_collections.community.general.plugins.module_utils.vexata import (

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: vmadm module: vmadm
short_description: Manage SmartOS virtual machines and zones short_description: Manage SmartOS virtual machines and zones
description: description:
@ -27,8 +26,7 @@ options:
archive_on_delete: archive_on_delete:
required: false required: false
description: description:
- When enabled, the zone dataset will be mounted on C(/zones/archive) - When enabled, the zone dataset will be mounted on C(/zones/archive) upon removal.
upon removal.
type: bool type: bool
autoboot: autoboot:
required: false required: false
@ -36,7 +34,7 @@ options:
- Whether or not a VM is booted when the system is rebooted. - Whether or not a VM is booted when the system is rebooted.
type: bool type: bool
brand: brand:
choices: [ joyent, joyent-minimal, lx, kvm, bhyve ] choices: [joyent, joyent-minimal, lx, kvm, bhyve]
default: joyent default: joyent
description: description:
- Type of virtual machine. The V(bhyve) option was added in community.general 0.2.0. - Type of virtual machine. The V(bhyve) option was added in community.general 0.2.0.
@ -49,18 +47,16 @@ options:
cpu_cap: cpu_cap:
required: false required: false
description: description:
- Sets a limit on the amount of CPU time that can be used by a VM. - Sets a limit on the amount of CPU time that can be used by a VM. Use V(0) for no cap.
Use V(0) for no cap.
type: int type: int
cpu_shares: cpu_shares:
required: false required: false
description: description:
- Sets a limit on the number of fair share scheduler (FSS) CPU shares for - Sets a limit on the number of fair share scheduler (FSS) CPU shares for a VM. This limit is relative to all other VMs on the system.
a VM. This limit is relative to all other VMs on the system.
type: int type: int
cpu_type: cpu_type:
required: false required: false
choices: [ qemu64, host ] choices: [qemu64, host]
default: qemu64 default: qemu64
description: description:
- Control the type of virtual CPU exposed to KVM VMs. - Control the type of virtual CPU exposed to KVM VMs.
@ -68,8 +64,7 @@ options:
customer_metadata: customer_metadata:
required: false required: false
description: description:
- Metadata to be set and associated with this VM, this contain customer - Metadata to be set and associated with this VM, this contain customer modifiable keys.
modifiable keys.
type: dict type: dict
delegate_dataset: delegate_dataset:
required: false required: false
@ -141,14 +136,12 @@ options:
internal_metadata: internal_metadata:
required: false required: false
description: description:
- Metadata to be set and associated with this VM, this contains operator - Metadata to be set and associated with this VM, this contains operator generated keys.
generated keys.
type: dict type: dict
internal_metadata_namespace: internal_metadata_namespace:
required: false required: false
description: description:
- List of namespaces to be set as C(internal_metadata-only); these namespaces - List of namespaces to be set as C(internal_metadata-only); these namespaces will come from O(internal_metadata) rather than O(customer_metadata).
will come from O(internal_metadata) rather than O(customer_metadata).
type: str type: str
kernel_version: kernel_version:
required: false required: false
@ -163,8 +156,7 @@ options:
maintain_resolvers: maintain_resolvers:
required: false required: false
description: description:
- Resolvers in C(/etc/resolv.conf) will be updated when updating - Resolvers in C(/etc/resolv.conf) will be updated when updating the O(resolvers) property.
the O(resolvers) property.
type: bool type: bool
max_locked_memory: max_locked_memory:
required: false required: false
@ -189,12 +181,11 @@ options:
mdata_exec_timeout: mdata_exec_timeout:
required: false required: false
description: description:
- Timeout in seconds (or 0 to disable) for the C(svc:/smartdc/mdata:execute) service - Timeout in seconds (or 0 to disable) for the C(svc:/smartdc/mdata:execute) service that runs user-scripts in the zone.
that runs user-scripts in the zone.
type: int type: int
name: name:
required: false required: false
aliases: [ alias ] aliases: [alias]
description: description:
- Name of the VM. vmadm(1M) uses this as an optional name. - Name of the VM. vmadm(1M) uses this as an optional name.
type: str type: str
@ -212,14 +203,12 @@ options:
nowait: nowait:
required: false required: false
description: description:
- Consider the provisioning complete when the VM first starts, rather than - Consider the provisioning complete when the VM first starts, rather than when the VM has rebooted.
when the VM has rebooted.
type: bool type: bool
qemu_opts: qemu_opts:
required: false required: false
description: description:
- Additional qemu arguments for KVM guests. This overwrites the default arguments - Additional qemu arguments for KVM guests. This overwrites the default arguments provided by vmadm(1M) and should only be used for debugging.
provided by vmadm(1M) and should only be used for debugging.
type: str type: str
qemu_extra_opts: qemu_extra_opts:
required: false required: false
@ -245,8 +234,7 @@ options:
routes: routes:
required: false required: false
description: description:
- Dictionary that maps destinations to gateways, these will be set as static - Dictionary that maps destinations to gateways, these will be set as static routes in the VM.
routes in the VM.
type: dict type: dict
spice_opts: spice_opts:
required: false required: false
@ -256,19 +244,15 @@ options:
spice_password: spice_password:
required: false required: false
description: description:
- Password required to connect to SPICE. By default no password is set. - Password required to connect to SPICE. By default no password is set. Please note this can be read from the Global Zone.
Please note this can be read from the Global Zone.
type: str type: str
state: state:
choices: [ present, running, absent, deleted, stopped, created, restarted, rebooted ] choices: [present, running, absent, deleted, stopped, created, restarted, rebooted]
default: running default: running
description: description:
- States for the VM to be in. Please note that V(present), V(stopped) and V(restarted) - States for the VM to be in. Please note that V(present), V(stopped) and V(restarted) operate on a VM that is currently provisioned. V(present)
operate on a VM that is currently provisioned. V(present) means that the VM will be means that the VM will be created if it was absent, and that it will be in a running state. V(absent) will shutdown the zone before removing
created if it was absent, and that it will be in a running state. V(absent) will it. V(stopped) means the zone will be created if it does not exist already, before shutting it down.
shutdown the zone before removing it.
V(stopped) means the zone will be created if it does not exist already, before shutting
it down.
type: str type: str
tmpfs: tmpfs:
required: false required: false
@ -303,20 +287,17 @@ options:
vnc_password: vnc_password:
required: false required: false
description: description:
- Password required to connect to VNC. By default no password is set. - Password required to connect to VNC. By default no password is set. Please note this can be read from the Global Zone.
Please note this can be read from the Global Zone.
type: str type: str
vnc_port: vnc_port:
required: false required: false
description: description:
- TCP port to listen of the VNC server. Or set V(0) for random, - TCP port to listen of the VNC server. Or set V(0) for random, or V(-1) to disable.
or V(-1) to disable.
type: int type: int
zfs_data_compression: zfs_data_compression:
required: false required: false
description: description:
- Specifies compression algorithm used for this VMs data dataset. This option - Specifies compression algorithm used for this VMs data dataset. This option only has effect on delegated datasets.
only has effect on delegated datasets.
type: str type: str
zfs_data_recsize: zfs_data_recsize:
required: false required: false
@ -336,8 +317,7 @@ options:
zfs_root_compression: zfs_root_compression:
required: false required: false
description: description:
- Specifies compression algorithm used for this VMs root dataset. This option - Specifies compression algorithm used for this VMs root dataset. This option only has effect on the zoneroot dataset.
only has effect on the zoneroot dataset.
type: str type: str
zfs_root_recsize: zfs_root_recsize:
required: false required: false
@ -354,9 +334,9 @@ options:
description: description:
- ZFS pool the VM's zone dataset will be created in. - ZFS pool the VM's zone dataset will be created in.
type: str type: str
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create SmartOS zone - name: Create SmartOS zone
community.general.vmadm: community.general.vmadm:
brand: joyent brand: joyent
@ -382,9 +362,9 @@ EXAMPLES = '''
community.general.vmadm: community.general.vmadm:
uuid: '*' uuid: '*'
state: stopped state: stopped
''' """
RETURN = ''' RETURN = r"""
uuid: uuid:
description: UUID of the managed VM. description: UUID of the managed VM.
returned: always returned: always
@ -400,7 +380,7 @@ state:
returned: success returned: success
type: str type: str
sample: 'running' sample: 'running'
''' """
import json import json
import os import os

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: wakeonlan module: wakeonlan
short_description: Send a magic Wake-on-LAN (WoL) broadcast packet short_description: Send a magic Wake-on-LAN (WoL) broadcast packet
description: description:
@ -25,17 +24,17 @@ attributes:
options: options:
mac: mac:
description: description:
- MAC address to send Wake-on-LAN broadcast packet for. - MAC address to send Wake-on-LAN broadcast packet for.
required: true required: true
type: str type: str
broadcast: broadcast:
description: description:
- Network broadcast address to use for broadcasting magic Wake-on-LAN packet. - Network broadcast address to use for broadcasting magic Wake-on-LAN packet.
default: 255.255.255.255 default: 255.255.255.255
type: str type: str
port: port:
description: description:
- UDP port to use for magic Wake-on-LAN packet. - UDP port to use for magic Wake-on-LAN packet.
default: 7 default: 7
type: int type: int
todo: todo:
@ -43,16 +42,16 @@ todo:
- Enable check-mode support (when we have arping support) - Enable check-mode support (when we have arping support)
- Does not have SecureOn password support - Does not have SecureOn password support
notes: notes:
- This module sends a magic packet, without knowing whether it worked - This module sends a magic packet, without knowing whether it worked.
- Only works if the target system was properly configured for Wake-on-LAN (in the BIOS and/or the OS) - Only works if the target system was properly configured for Wake-on-LAN (in the BIOS and/or the OS).
- Some BIOSes have a different (configurable) Wake-on-LAN boot order (i.e. PXE first). - Some BIOSes have a different (configurable) Wake-on-LAN boot order (i.e. PXE first).
seealso: seealso:
- module: community.windows.win_wakeonlan - module: community.windows.win_wakeonlan
author: author:
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66 - name: Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66
community.general.wakeonlan: community.general.wakeonlan:
mac: '00:00:5E:00:53:66' mac: '00:00:5E:00:53:66'
@ -63,11 +62,11 @@ EXAMPLES = r'''
mac: 00:00:5E:00:53:66 mac: 00:00:5E:00:53:66
port: 9 port: 9
delegate_to: localhost delegate_to: localhost
''' """
RETURN = r''' RETURN = r"""
# Default return values # Default return values
''' """
import socket import socket
import struct import struct
import traceback import traceback

View File

@ -8,14 +8,12 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: wdc_redfish_command module: wdc_redfish_command
short_description: Manages WDC UltraStar Data102 Out-Of-Band controllers using Redfish APIs short_description: Manages WDC UltraStar Data102 Out-Of-Band controllers using Redfish APIs
version_added: 5.4.0 version_added: 5.4.0
description: description:
- Builds Redfish URIs locally and sends them to remote OOB controllers to - Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action.
perform an action.
- Manages OOB controller firmware. For example, Firmware Activate, Update and Activate. - Manages OOB controller firmware. For example, Firmware Activate, Update and Activate.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -38,11 +36,11 @@ options:
elements: str elements: str
baseuri: baseuri:
description: description:
- Base URI of OOB controller. Must include this or O(ioms). - Base URI of OOB controller. Must include this or O(ioms).
type: str type: str
ioms: ioms:
description: description:
- List of IOM FQDNs for the enclosure. Must include this or O(baseuri). - List of IOM FQDNs for the enclosure. Must include this or O(baseuri).
type: list type: list
elements: str elements: str
username: username:
@ -90,14 +88,12 @@ options:
- The password for retrieving the update image. - The password for retrieving the update image.
type: str type: str
notes: notes:
- In the inventory, you can specify baseuri or ioms. See the EXAMPLES section. - In the inventory, you can specify baseuri or ioms. See the EXAMPLES section.
- ioms is a list of FQDNs for the enclosure's IOMs. - Ioms is a list of FQDNs for the enclosure's IOMs.
author: Mike Moerk (@mikemoerk) author: Mike Moerk (@mikemoerk)
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Firmware Activate (required after SimpleUpdate to apply the new firmware) - name: Firmware Activate (required after SimpleUpdate to apply the new firmware)
community.general.wdc_redfish_command: community.general.wdc_redfish_command:
category: Update category: Update
@ -188,16 +184,15 @@ EXAMPLES = '''
category: Chassis category: Chassis
resource_id: Enclosure resource_id: Enclosure
command: PowerModeNormal command: PowerModeNormal
"""
''' RETURN = r"""
RETURN = '''
msg: msg:
description: Message with action result or error description description: Message with action result or error description.
returned: always returned: always
type: str type: str
sample: "Action was successful" sample: "Action was successful"
''' """
from ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils import WdcRedfishUtils from ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils import WdcRedfishUtils
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -8,14 +8,12 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: wdc_redfish_info module: wdc_redfish_info
short_description: Manages WDC UltraStar Data102 Out-Of-Band controllers using Redfish APIs short_description: Manages WDC UltraStar Data102 Out-Of-Band controllers using Redfish APIs
version_added: 5.4.0 version_added: 5.4.0
description: description:
- Builds Redfish URIs locally and sends them to remote OOB controllers to - Builds Redfish URIs locally and sends them to remote OOB controllers to get information back.
get information back.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
@ -33,11 +31,11 @@ options:
elements: str elements: str
baseuri: baseuri:
description: description:
- Base URI of OOB controller. Must include this or O(ioms). - Base URI of OOB controller. Must include this or O(ioms).
type: str type: str
ioms: ioms:
description: description:
- List of IOM FQDNs for the enclosure. Must include this or O(baseuri). - List of IOM FQDNs for the enclosure. Must include this or O(baseuri).
type: list type: list
elements: str elements: str
username: username:
@ -59,13 +57,12 @@ options:
type: int type: int
notes: notes:
- In the inventory, you can specify baseuri or ioms. See the EXAMPLES section. - In the inventory, you can specify baseuri or ioms. See the EXAMPLES section.
- ioms is a list of FQDNs for the enclosure's IOMs. - Ioms is a list of FQDNs for the enclosure's IOMs.
author: Mike Moerk (@mikemoerk) author: Mike Moerk (@mikemoerk)
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get Simple Update Status with individual IOMs specified - name: Get Simple Update Status with individual IOMs specified
community.general.wdc_redfish_info: community.general.wdc_redfish_info:
category: Update category: Update
@ -93,30 +90,30 @@ EXAMPLES = '''
- name: Print fetched information - name: Print fetched information
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ result.redfish_facts.simple_update_status.entries | to_nice_json }}" msg: "{{ result.redfish_facts.simple_update_status.entries | to_nice_json }}"
''' """
RETURN = ''' RETURN = r"""
Description: Description:
description: Firmware update status description. description: Firmware update status description.
returned: always returned: always
type: str type: str
sample: Ready for FW update sample: Ready for FW update
ErrorCode: ErrorCode:
description: Numeric error code for firmware update status. Non-zero indicates an error condition. description: Numeric error code for firmware update status. Non-zero indicates an error condition.
returned: always returned: always
type: int type: int
sample: 0 sample: 0
EstimatedRemainingMinutes: EstimatedRemainingMinutes:
description: Estimated number of minutes remaining in firmware update operation. description: Estimated number of minutes remaining in firmware update operation.
returned: always returned: always
type: int type: int
sample: 20 sample: 20
StatusCode: StatusCode:
description: Firmware update status code. description: Firmware update status code.
returned: always returned: always
type: int type: int
sample: 2 sample: 2
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.text.converters import to_native