zfs modules: adjust docs (#9281)

* zfs modules: adjust docs

* Apply suggestions from code review

* fix examples indentation

* Update plugins/modules/zfs.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2024-12-22 11:42:54 +13:00 committed by GitHub
parent afa5716e0b
commit 1b6c05176b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 140 additions and 149 deletions

View file

@ -8,18 +8,17 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: zfs_delegate_admin
short_description: Manage ZFS delegated administration (user admin privileges)
description:
- Manages ZFS file system delegated administration permissions, which allow unprivileged users to perform ZFS
operations normally restricted to the superuser.
- Manages ZFS file system delegated administration permissions, which allow unprivileged users to perform ZFS operations normally restricted
to the superuser.
- See the C(zfs allow) section of V(zfs(1M\)) for detailed explanations of options.
- This module attempts to adhere to the behavior of the command line tool as much as possible.
requirements:
- "A ZFS/OpenZFS implementation that supports delegation with C(zfs allow), including: Solaris >= 10, illumos (all
versions), FreeBSD >= 8.0R, ZFS on Linux >= 0.7.0."
- "A ZFS/OpenZFS implementation that supports delegation with C(zfs allow), including: Solaris >= 10, illumos (all versions), FreeBSD >= 8.0R,
ZFS on Linux >= 0.7.0."
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -38,7 +37,7 @@ options:
- Whether to allow (V(present)), or unallow (V(absent)) a permission.
- When set to V(present), at least one "entity" param of O(users), O(groups), or O(everyone) are required.
- When set to V(absent), removes permissions from the specified entities, or removes all permissions if no entity params are specified.
choices: [ absent, present ]
choices: [absent, present]
default: present
type: str
users:
@ -59,8 +58,8 @@ options:
permissions:
description:
- The list of permission(s) to delegate (required if O(state=present)).
- Supported permissions depend on the ZFS version in use. See for example
U(https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html) for OpenZFS.
- Supported permissions depend on the ZFS version in use. See for example U(https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html)
for OpenZFS.
type: list
elements: str
local:
@ -77,10 +76,10 @@ options:
type: bool
default: false
author:
- Nate Coraor (@natefoo)
'''
- Nate Coraor (@natefoo)
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Grant `zfs allow` and `unallow` permission to the `adm` user with the default local+descendents scope
community.general.zfs_delegate_admin:
name: rpool/myfs
@ -106,12 +105,12 @@ EXAMPLES = r'''
name: rpool/myfs
everyone: true
state: absent
'''
"""
# This module does not return anything other than the standard
# changed/state/msg/stdout
RETURN = '''
'''
RETURN = r"""
"""
from itertools import product