z mods adjust docs (#9306)

z* modules: adjust docs (re-commiting with adjustment from PR)
pull/8437/merge
Alexei Znamensky 2024-12-23 21:40:39 +13:00 committed by GitHub
parent e809a25486
commit d05d067f3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 128 additions and 216 deletions

View File

@ -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

View File

@ -8,8 +8,7 @@ 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:
@ -24,7 +23,7 @@ extends_documentation_fragment:
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:
@ -67,8 +66,7 @@ options:
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
@ -82,9 +80,9 @@ options:
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'

View File

@ -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:
@ -29,21 +28,20 @@ options:
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. - Specifies which dataset properties should be queried in comma-separated format. For more information about dataset properties, check zpool(1M)
For more information about dataset properties, check zpool(1M) man page. 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