[vw]*: adjust docs (#9309)

[vm]*: adjust docs
pull/8437/merge
Alexei Znamensky 2024-12-23 21:28:05 +13:00 committed by GitHub
parent 2adcc34dd5
commit b57fef201e
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,8 +8,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
author: author:
- Bryan Gurney (@bgurney-rh) - Bryan Gurney (@bgurney-rh)
@ -20,10 +19,8 @@ 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
@ -41,31 +38,19 @@ options:
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.
Not all parameters of an existing VDO volume can be
modified; the "statusparamkeys" list contains the
parameters that can be modified after creation. If an
"absent" VDO volume does not exist, it will not be
removed.
type: str type: str
choices: [absent, present] choices: [absent, present]
default: present default: present
activated: activated:
description: description:
- The "activate" status for a VDO volume. If this is set - 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
to V(false), the VDO volume cannot be started, and it will startup. However, on initial creation, a VDO volume with "activated" set to "off" will be running, until stopped. This is the default
not start on system startup. However, on initial behavior of the C(vdo create) command; it provides the user an opportunity to write a base amount of metadata (filesystem, LVM headers,
creation, a VDO volume with "activated" set to "off" etc.) to the VDO volume prior to stopping the volume, and leaving it deactivated until ready to use.
will be running, until stopped. This is the default
behavior of the "vdo create" command; it provides the
user an opportunity to write a base amount of metadata
(filesystem, LVM headers, etc.) to the VDO volume prior
to stopping the volume, and leaving it deactivated
until ready to use.
type: bool type: bool
running: running:
description: description:
@ -75,209 +60,135 @@ options:
device: device:
description: description:
- The full path of the device to use for VDO storage. - The full path of the device to use for VDO storage.
- This is required if "state" is "present". - This is required if O(state=present).
type: str type: str
logicalsize: logicalsize:
description: description:
- The logical size of the VDO volume (in megabytes, or - 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
LVM suffix format). If not specified for a new volume, size as the underlying storage device, which is specified in the O(device) parameter. Existing volumes will maintain their size if the
this defaults to the same size as the underlying storage logicalsize parameter is not specified, or is smaller than or identical to the current size. If the specified size is larger than the
device, which is specified in the 'device' parameter. current size, a C(growlogical) operation will be performed.
Existing volumes will maintain their size if the
logicalsize parameter is not specified, or is smaller
than or identical to the current size. If the specified
size is larger than the current size, a growlogical
operation will be performed.
type: str type: str
deduplication: deduplication:
description: description:
- Configures whether deduplication is enabled. The - Configures whether deduplication is enabled. The default for a created volume is V(enabled). Existing volumes will maintain their previously
default for a created volume is 'enabled'. Existing configured setting unless a different value is specified in the playbook.
volumes will maintain their previously configured
setting unless a different value is specified in the
playbook.
type: str type: str
choices: [disabled, enabled] choices: [disabled, enabled]
compression: compression:
description: description:
- Configures whether compression is enabled. The default - Configures whether compression is enabled. The default for a created volume is V(enabled). Existing volumes will maintain their previously
for a created volume is 'enabled'. Existing volumes configured setting unless a different value is specified in the playbook.
will maintain their previously configured setting unless
a different value is specified in the playbook.
type: str type: str
choices: [disabled, enabled] choices: [disabled, enabled]
blockmapcachesize: blockmapcachesize:
description: description:
- The amount of memory allocated for caching block map - 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).
pages, in megabytes (or may be issued with an LVM-style 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
suffix of K, M, G, or T). The default (and minimum) of block map covers 1T of logical blocks, therefore a small amount of block map cache memory can cache a significantly large amount of
value is 128M. The value specifies the size of the block map data.
cache; there is a 15% memory usage overhead. Each 1.25G - Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook.
of block map covers 1T of logical blocks, therefore a
small amount of block map cache memory can cache a
significantly large amount of block map data. Existing
volumes will maintain their previously configured
setting unless a different value is specified in the
playbook.
type: str type: str
readcache: readcache:
description: description:
- Enables or disables the read cache. The default is - Enables or disables the read cache. The default is V(disabled). Choosing V(enabled) enables a read cache which may improve performance
'disabled'. Choosing 'enabled' enables a read cache for workloads of high deduplication, read workloads with a high level of compression, or on hard disk storage. Existing volumes will maintain
which may improve performance for workloads of high their previously configured setting unless a different value is specified in the playbook.
deduplication, read workloads with a high level of
compression, or on hard disk storage. Existing
volumes will maintain their previously configured
setting unless a different value is specified in the
playbook.
- The read cache feature is available in VDO 6.1 and older. - The read cache feature is available in VDO 6.1 and older.
type: str type: str
choices: [disabled, enabled] choices: [disabled, enabled]
readcachesize: readcachesize:
description: description:
- Specifies the extra VDO device read cache size in - 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
megabytes. This is in addition to a system-defined 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
minimum. Using a value with a suffix of K, M, G, or T (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
is optional. The default value is 0. 1.125 MB of specified). Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook.
memory per bio thread will be used per 1 MB of read
cache specified (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 specified).
Existing volumes will maintain their previously
configured setting unless a different value is specified
in the playbook.
- The read cache feature is available in VDO 6.1 and older. - The read cache feature is available in VDO 6.1 and older.
type: str type: str
emulate512: emulate512:
description: description:
- Enables 512-byte emulation mode, allowing drivers or - Enables 512-byte emulation mode, allowing drivers or filesystems to access the VDO volume at 512-byte granularity, instead of the default
filesystems to access the VDO volume at 512-byte 4096-byte granularity.
granularity, instead of the default 4096-byte granularity. - Only recommended when a driver or filesystem requires 512-byte sector level access to a device.
Default is 'disabled'; only recommended when a driver - This option is only available when creating a new volume, and cannot be changed for an existing volume.
or filesystem requires 512-byte sector level access to
a device. This option is only available when creating
a new volume, and cannot be changed for an existing
volume.
type: bool type: bool
default: false default: false
growphysical: growphysical:
description: description:
- Specifies whether to attempt to execute a growphysical - Specifies whether to attempt to execute a C(growphysical) operation, if there is enough unused space on the device. A C(growphysical)
operation, if there is enough unused space on the 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.
device. A growphysical 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.
type: bool type: bool
default: false default: false
slabsize: slabsize:
description: description:
- The size of the increment by which the physical size of - 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
a VDO volume is grown, in megabytes (or may be issued 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
with an LVM-style suffix of K, M, G, or T). Must be a 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
power of two between 128M and 32G. The default is 2G, be changed for an existing volume.
which supports volumes having a physical size up to 16T.
The maximum, 32G, supports a physical size of up to 256T.
This option is only available when creating a new
volume, and cannot be changed for an existing volume.
type: str type: str
writepolicy: writepolicy:
description: description:
- Specifies the write policy of the VDO volume. The - Specifies the write policy of the VDO volume.
'sync' mode acknowledges writes only after data is on - The V(sync) mode acknowledges writes only after data is on stable storage.
stable storage. The 'async' mode acknowledges writes - The V(async) mode acknowledges writes when data has been cached for writing to stable storage.
when data has been cached for writing to stable - The default (and highly recommended) V(auto) mode checks the storage device to determine whether it supports flushes. Devices that support
storage. The default (and highly recommended) 'auto' flushes will result in a VDO volume in V(async) mode, while devices that do not support flushes will run in V(sync) mode.
mode checks the storage device to determine whether it - Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook.
supports flushes. Devices that support flushes will
result in a VDO volume in 'async' mode, while devices
that do not support flushes will run in sync mode.
Existing volumes will maintain their previously
configured setting unless a different value is
specified in the playbook.
type: str type: str
choices: [async, auto, sync] choices: [async, auto, sync]
indexmem: indexmem:
description: description:
- Specifies the amount of index memory in gigabytes. The - 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
default is 0.25. The special decimal values 0.25, 0.5, be used, as can any positive integer. This option is only available when creating a new volume, and cannot be changed for an existing
and 0.75 can be used, as can any positive integer. volume.
This option is only available when creating a new
volume, and cannot be changed for an existing volume.
type: str type: str
indexmode: indexmode:
description: description:
- Specifies the index mode of the Albireo index. The - Specifies the index mode of the Albireo index.
default is 'dense', which has a deduplication window of - 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
1 GB of index memory per 1 TB of incoming data, data on persistent storage.
requiring 10 GB of index data on persistent storage. - 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
The 'sparse' mode has a deduplication window of 1 GB of persistent storage.
index memory per 10 TB of incoming data, but requires - This option is only available when creating a new volume, and cannot be changed for an existing volume.
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 type: str
choices: [dense, sparse] choices: [dense, sparse]
ackthreads: ackthreads:
description: description:
- Specifies the number of threads to use for - Specifies the number of threads to use for acknowledging completion of requested VDO I/O operations. Valid values are integer values from
acknowledging completion of requested VDO I/O operations. V(1) to V(100) (lower numbers are preferable due to overhead). The default is V(1). Existing volumes will maintain their previously configured
Valid values are integer values from 1 to 100 (lower setting unless a different value is specified in the playbook.
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 type: str
biothreads: biothreads:
description: description:
- Specifies the number of threads to use for submitting I/O - Specifies the number of threads to use for submitting I/O operations to the storage device. Valid values are integer values from V(1)
operations to the storage device. Valid values are to V(100) (lower numbers are preferable due to overhead). The default is V(4). Existing volumes will maintain their previously configured
integer values from 1 to 100 (lower numbers are setting unless a different value is specified in the playbook.
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 type: str
cputhreads: cputhreads:
description: description:
- Specifies the number of threads to use for CPU-intensive - Specifies the number of threads to use for CPU-intensive work such as hashing or compression. Valid values are integer values from V(1)
work such as hashing or compression. Valid values are to V(100) (lower numbers are preferable due to overhead). The default is V(2). Existing volumes will maintain their previously configured
integer values from 1 to 100 (lower numbers are setting unless a different value is specified in the playbook.
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 type: str
logicalthreads: logicalthreads:
description: description:
- Specifies the number of threads across which to - Specifies the number of threads across which to subdivide parts of the VDO processing based on logical block addresses. Valid values are
subdivide parts of the VDO processing based on logical integer values from V(1) to V(100) (lower numbers are preferable due to overhead). The default is V(1). Existing volumes will maintain
block addresses. Valid values are integer values from their previously configured setting unless a different value is specified in the playbook.
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 type: str
physicalthreads: physicalthreads:
description: description:
- Specifies the number of threads across which to - Specifies the number of threads across which to subdivide parts of the VDO processing based on physical block addresses. Valid values
subdivide parts of the VDO processing based on physical 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
block addresses. Valid values are integer values from larger than (O(slabsize) * O(physicalthreads)). The default is V(1). Existing volumes will maintain their previously configured setting
1 to 16 (lower numbers are preferable due to overhead). unless a different value is specified in the playbook.
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 type: str
force: force:
description: description:
- When creating a volume, ignores any existing file system - When creating a volume, ignores any existing file system or VDO signature already present in the storage device. When stopping or removing
or VDO signature already present in the storage device. a VDO volume, first unmounts the file system stored on the device if mounted.
When stopping or removing a VDO volume, first unmounts - B(Warning:) Since this parameter removes all safety checks it is important to make sure that all parameters provided are accurate and
the file system stored on the device if mounted. intentional.
- "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 type: bool
default: false default: false
version_added: 2.4.0 version_added: 2.4.0
@ -287,9 +198,9 @@ 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,8 +8,7 @@ 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:
@ -56,19 +55,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)
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: ['unixODBC', 'pyodbc'] 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)
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: ['unixODBC', 'pyodbc'] 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)
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: ['unixODBC', 'pyodbc'] 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)
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: ['unixODBC', 'pyodbc'] 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)
to be added to the C(Driver) section of either C(/etc/vertica.ini) or C($HOME/.vertica.ini).
requirements: ['unixODBC', 'pyodbc'] 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,14 +9,12 @@ 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)
@ -52,10 +50,9 @@ options:
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,8 +9,7 @@ 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:
@ -41,10 +40,9 @@ options:
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
@ -49,14 +47,12 @@ 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
@ -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,8 +181,7 @@ 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
@ -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:
@ -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
@ -91,13 +89,11 @@ options:
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
@ -60,12 +58,11 @@ options:
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,9 +90,9 @@ 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
@ -116,7 +113,7 @@ StatusCode:
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