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