[PR #9306/d05d067f backport][stable-9] z mods adjust docs (#9328)
z mods adjust docs (#9306)
z* modules: adjust docs (re-commiting with adjustment from PR)
(cherry picked from commit d05d067f3b
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pull/9345/head
parent
f9086b4680
commit
3dd1c9d64a
|
@ -73,83 +73,33 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
name:
|
||||
description: ZFS dataset name
|
||||
description: ZFS dataset name.
|
||||
returned: always
|
||||
type: str
|
||||
sample: rpool/var/spool
|
||||
parsable:
|
||||
description: if parsable output should be provided in machine friendly format.
|
||||
description: If parsable output should be provided in machine friendly format.
|
||||
returned: if O(parsable=True)
|
||||
type: bool
|
||||
sample: true
|
||||
recurse:
|
||||
description: if we should recurse over ZFS dataset
|
||||
description: If we should recurse over ZFS dataset.
|
||||
returned: if O(recurse=True)
|
||||
type: bool
|
||||
sample: true
|
||||
zfs_datasets:
|
||||
description: ZFS dataset facts
|
||||
description: ZFS dataset facts.
|
||||
returned: always
|
||||
type: str
|
||||
sample:
|
||||
{
|
||||
"aclinherit": "restricted",
|
||||
"aclmode": "discard",
|
||||
"atime": "on",
|
||||
"available": "43.8G",
|
||||
"canmount": "on",
|
||||
"casesensitivity": "sensitive",
|
||||
"checksum": "on",
|
||||
"compression": "off",
|
||||
"compressratio": "1.00x",
|
||||
"copies": "1",
|
||||
"creation": "Thu Jun 16 11:37 2016",
|
||||
"dedup": "off",
|
||||
"devices": "on",
|
||||
"exec": "on",
|
||||
"filesystem_count": "none",
|
||||
"filesystem_limit": "none",
|
||||
"logbias": "latency",
|
||||
"logicalreferenced": "18.5K",
|
||||
"logicalused": "3.45G",
|
||||
"mlslabel": "none",
|
||||
"mounted": "yes",
|
||||
"mountpoint": "/rpool",
|
||||
"name": "rpool",
|
||||
"nbmand": "off",
|
||||
"normalization": "none",
|
||||
"org.openindiana.caiman:install": "ready",
|
||||
"primarycache": "all",
|
||||
"quota": "none",
|
||||
"readonly": "off",
|
||||
"recordsize": "128K",
|
||||
"redundant_metadata": "all",
|
||||
"refcompressratio": "1.00x",
|
||||
"referenced": "29.5K",
|
||||
"refquota": "none",
|
||||
"refreservation": "none",
|
||||
"reservation": "none",
|
||||
"secondarycache": "all",
|
||||
"setuid": "on",
|
||||
"sharenfs": "off",
|
||||
"sharesmb": "off",
|
||||
"snapdir": "hidden",
|
||||
"snapshot_count": "none",
|
||||
"snapshot_limit": "none",
|
||||
"sync": "standard",
|
||||
"type": "filesystem",
|
||||
"used": "4.41G",
|
||||
"usedbychildren": "4.41G",
|
||||
"usedbydataset": "29.5K",
|
||||
"usedbyrefreservation": "0",
|
||||
"usedbysnapshots": "0",
|
||||
"utf8only": "off",
|
||||
"version": "5",
|
||||
"vscan": "off",
|
||||
"written": "29.5K",
|
||||
"xattr": "on",
|
||||
"zoned": "off"
|
||||
}
|
||||
sample: {"aclinherit": "restricted", "aclmode": "discard", "atime": "on", "available": "43.8G", "canmount": "on", "casesensitivity": "sensitive",
|
||||
"checksum": "on", "compression": "off", "compressratio": "1.00x", "copies": "1", "creation": "Thu Jun 16 11:37 2016", "dedup": "off", "devices": "on",
|
||||
"exec": "on", "filesystem_count": "none", "filesystem_limit": "none", "logbias": "latency", "logicalreferenced": "18.5K", "logicalused": "3.45G",
|
||||
"mlslabel": "none", "mounted": "yes", "mountpoint": "/rpool", "name": "rpool", "nbmand": "off", "normalization": "none", "org.openindiana.caiman:install":
|
||||
"ready", "primarycache": "all", "quota": "none", "readonly": "off", "recordsize": "128K", "redundant_metadata": "all", "refcompressratio": "1.00x",
|
||||
"referenced": "29.5K", "refquota": "none", "refreservation": "none", "reservation": "none", "secondarycache": "all", "setuid": "on", "sharenfs": "off",
|
||||
"sharesmb": "off", "snapdir": "hidden", "snapshot_count": "none", "snapshot_limit": "none", "sync": "standard", "type": "filesystem", "used": "4.41G",
|
||||
"usedbychildren": "4.41G", "usedbydataset": "29.5K", "usedbyrefreservation": "0", "usedbysnapshots": "0", "utf8only": "off", "version": "5",
|
||||
"vscan": "off", "written": "29.5K", "xattr": "on", "zoned": "off"}
|
||||
"""
|
||||
|
||||
from collections import defaultdict
|
||||
|
|
|
@ -8,83 +8,81 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: znode
|
||||
short_description: Create, delete, retrieve, and update znodes using ZooKeeper
|
||||
description:
|
||||
- Create, delete, retrieve, and update znodes using ZooKeeper.
|
||||
- Create, delete, retrieve, and update znodes using ZooKeeper.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
diff_mode:
|
||||
support: none
|
||||
check_mode:
|
||||
support: none
|
||||
diff_mode:
|
||||
support: none
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
- community.general.attributes
|
||||
options:
|
||||
hosts:
|
||||
description:
|
||||
- A list of ZooKeeper servers (format '[server]:[port]').
|
||||
required: true
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The path of the znode.
|
||||
required: true
|
||||
type: str
|
||||
value:
|
||||
description:
|
||||
- The value assigned to the znode.
|
||||
type: str
|
||||
op:
|
||||
description:
|
||||
- An operation to perform. Mutually exclusive with state.
|
||||
choices: [ get, wait, list ]
|
||||
type: str
|
||||
state:
|
||||
description:
|
||||
- The state to enforce. Mutually exclusive with op.
|
||||
choices: [ present, absent ]
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
- The amount of time to wait for a node to appear.
|
||||
default: 300
|
||||
type: int
|
||||
recursive:
|
||||
description:
|
||||
- Recursively delete node and all its children.
|
||||
type: bool
|
||||
default: false
|
||||
auth_scheme:
|
||||
description:
|
||||
- 'Authentication scheme.'
|
||||
choices: [ digest, sasl ]
|
||||
type: str
|
||||
default: "digest"
|
||||
required: false
|
||||
version_added: 5.8.0
|
||||
auth_credential:
|
||||
description:
|
||||
- The authentication credential value. Depends on O(auth_scheme).
|
||||
- The format for O(auth_scheme=digest) is C(user:password),
|
||||
and the format for O(auth_scheme=sasl) is C(user:password).
|
||||
type: str
|
||||
required: false
|
||||
version_added: 5.8.0
|
||||
use_tls:
|
||||
description:
|
||||
- Using TLS/SSL or not.
|
||||
type: bool
|
||||
default: false
|
||||
required: false
|
||||
version_added: '6.5.0'
|
||||
hosts:
|
||||
description:
|
||||
- A list of ZooKeeper servers (format V([server]:[port])).
|
||||
required: true
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The path of the znode.
|
||||
required: true
|
||||
type: str
|
||||
value:
|
||||
description:
|
||||
- The value assigned to the znode.
|
||||
type: str
|
||||
op:
|
||||
description:
|
||||
- An operation to perform. Mutually exclusive with state.
|
||||
choices: [get, wait, list]
|
||||
type: str
|
||||
state:
|
||||
description:
|
||||
- The state to enforce. Mutually exclusive with op.
|
||||
choices: [present, absent]
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
- The amount of time to wait for a node to appear.
|
||||
default: 300
|
||||
type: int
|
||||
recursive:
|
||||
description:
|
||||
- Recursively delete node and all its children.
|
||||
type: bool
|
||||
default: false
|
||||
auth_scheme:
|
||||
description:
|
||||
- 'Authentication scheme.'
|
||||
choices: [digest, sasl]
|
||||
type: str
|
||||
default: "digest"
|
||||
required: false
|
||||
version_added: 5.8.0
|
||||
auth_credential:
|
||||
description:
|
||||
- The authentication credential value. Depends on O(auth_scheme).
|
||||
- The format for O(auth_scheme=digest) is C(user:password), and the format for O(auth_scheme=sasl) is C(user:password).
|
||||
type: str
|
||||
required: false
|
||||
version_added: 5.8.0
|
||||
use_tls:
|
||||
description:
|
||||
- Using TLS/SSL or not.
|
||||
type: bool
|
||||
default: false
|
||||
required: false
|
||||
version_added: '6.5.0'
|
||||
requirements:
|
||||
- kazoo >= 2.1
|
||||
- kazoo >= 2.1
|
||||
author: "Trey Perry (@treyperry)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
EXAMPLES = r"""
|
||||
- name: Creating or updating a znode with a given value
|
||||
community.general.znode:
|
||||
hosts: 'localhost:2181'
|
||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: zpool_facts
|
||||
short_description: Gather facts about ZFS pools
|
||||
description:
|
||||
|
@ -21,29 +20,28 @@ extends_documentation_fragment:
|
|||
- community.general.attributes.facts
|
||||
- community.general.attributes.facts_module
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
- ZFS pool name.
|
||||
type: str
|
||||
aliases: [ "pool", "zpool" ]
|
||||
required: false
|
||||
parsable:
|
||||
description:
|
||||
- Specifies if property values should be displayed in machine
|
||||
friendly format.
|
||||
type: bool
|
||||
default: false
|
||||
required: false
|
||||
properties:
|
||||
description:
|
||||
- Specifies which dataset properties should be queried in comma-separated format.
|
||||
For more information about dataset properties, check zpool(1M) man page.
|
||||
type: str
|
||||
default: all
|
||||
required: false
|
||||
'''
|
||||
name:
|
||||
description:
|
||||
- ZFS pool name.
|
||||
type: str
|
||||
aliases: ["pool", "zpool"]
|
||||
required: false
|
||||
parsable:
|
||||
description:
|
||||
- Specifies if property values should be displayed in machine friendly format.
|
||||
type: bool
|
||||
default: false
|
||||
required: false
|
||||
properties:
|
||||
description:
|
||||
- Specifies which dataset properties should be queried in comma-separated format. For more information about dataset properties, check zpool(1M)
|
||||
man page.
|
||||
type: str
|
||||
default: all
|
||||
required: false
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Gather facts about ZFS pool rpool
|
||||
community.general.zpool_facts: pool=rpool
|
||||
|
||||
|
@ -54,71 +52,37 @@ EXAMPLES = '''
|
|||
ansible.builtin.debug:
|
||||
msg: 'ZFS pool {{ item.name }} has {{ item.free }} free space out of {{ item.size }}.'
|
||||
with_items: '{{ ansible_zfs_pools }}'
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
ansible_facts:
|
||||
description: Dictionary containing all the detailed information about the ZFS pool facts
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
ansible_zfs_pools:
|
||||
description: ZFS pool facts
|
||||
returned: always
|
||||
type: str
|
||||
sample:
|
||||
{
|
||||
"allocated": "3.46G",
|
||||
"altroot": "-",
|
||||
"autoexpand": "off",
|
||||
"autoreplace": "off",
|
||||
"bootfs": "rpool/ROOT/openindiana",
|
||||
"cachefile": "-",
|
||||
"capacity": "6%",
|
||||
"comment": "-",
|
||||
"dedupditto": "0",
|
||||
"dedupratio": "1.00x",
|
||||
"delegation": "on",
|
||||
"expandsize": "-",
|
||||
"failmode": "wait",
|
||||
"feature@async_destroy": "enabled",
|
||||
"feature@bookmarks": "enabled",
|
||||
"feature@edonr": "enabled",
|
||||
"feature@embedded_data": "active",
|
||||
"feature@empty_bpobj": "active",
|
||||
"feature@enabled_txg": "active",
|
||||
"feature@extensible_dataset": "enabled",
|
||||
"feature@filesystem_limits": "enabled",
|
||||
"feature@hole_birth": "active",
|
||||
"feature@large_blocks": "enabled",
|
||||
"feature@lz4_compress": "active",
|
||||
"feature@multi_vdev_crash_dump": "enabled",
|
||||
"feature@sha512": "enabled",
|
||||
"feature@skein": "enabled",
|
||||
"feature@spacemap_histogram": "active",
|
||||
"fragmentation": "3%",
|
||||
"free": "46.3G",
|
||||
"freeing": "0",
|
||||
"guid": "15729052870819522408",
|
||||
"health": "ONLINE",
|
||||
"leaked": "0",
|
||||
"listsnapshots": "off",
|
||||
"name": "rpool",
|
||||
"readonly": "off",
|
||||
"size": "49.8G",
|
||||
"version": "-"
|
||||
}
|
||||
description: Dictionary containing all the detailed information about the ZFS pool facts.
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
ansible_zfs_pools:
|
||||
description: ZFS pool facts.
|
||||
returned: always
|
||||
type: str
|
||||
sample: {"allocated": "3.46G", "altroot": "-", "autoexpand": "off", "autoreplace": "off", "bootfs": "rpool/ROOT/openindiana", "cachefile": "-",
|
||||
"capacity": "6%", "comment": "-", "dedupditto": "0", "dedupratio": "1.00x", "delegation": "on", "expandsize": "-", "failmode": "wait",
|
||||
"feature@async_destroy": "enabled", "feature@bookmarks": "enabled", "feature@edonr": "enabled", "feature@embedded_data": "active",
|
||||
"feature@empty_bpobj": "active", "feature@enabled_txg": "active", "feature@extensible_dataset": "enabled", "feature@filesystem_limits": "enabled",
|
||||
"feature@hole_birth": "active", "feature@large_blocks": "enabled", "feature@lz4_compress": "active", "feature@multi_vdev_crash_dump": "enabled",
|
||||
"feature@sha512": "enabled", "feature@skein": "enabled", "feature@spacemap_histogram": "active", "fragmentation": "3%", "free": "46.3G",
|
||||
"freeing": "0", "guid": "15729052870819522408", "health": "ONLINE", "leaked": "0", "listsnapshots": "off", "name": "rpool", "readonly": "off",
|
||||
"size": "49.8G", "version": "-"}
|
||||
name:
|
||||
description: ZFS pool name
|
||||
returned: always
|
||||
type: str
|
||||
sample: rpool
|
||||
description: ZFS pool name.
|
||||
returned: always
|
||||
type: str
|
||||
sample: rpool
|
||||
parsable:
|
||||
description: if parsable output should be provided in machine friendly format.
|
||||
returned: if 'parsable' is set to True
|
||||
type: bool
|
||||
sample: true
|
||||
'''
|
||||
description: If parsable output should be provided in machine friendly format.
|
||||
returned: if O(parsable=true)
|
||||
type: bool
|
||||
sample: true
|
||||
"""
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
|
|
Loading…
Reference in New Issue