zfs_delegate_admin: drop choices from permissions (#2540) (#2544)

instead of whitelisting some subset of known existing permissions, just
allow any string to be used as permissions. this way, any permission
supported by the underlying zfs commands can be used, eg. 'bookmark',
'load-key', 'change-key' and all property permissions, which were
missing from the choices list.

(cherry picked from commit dc0a56141f)

Co-authored-by: Lauri Tirkkonen <lauri@hacktheplanet.fi>
This commit is contained in:
patchback[bot] 2021-05-17 18:02:13 +00:00 committed by GitHub
parent 38aa0ec8ad
commit b78254fe24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- zfs_delegate_admin - drop choices from permissions, allowing any permission supported by the underlying zfs commands (https://github.com/ansible-collections/community.general/pull/2540).

View file

@ -51,8 +51,9 @@ options:
permissions:
description:
- The list of permission(s) to delegate (required if C(state) is C(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.
type: list
choices: [ allow, clone, create, destroy, diff, hold, mount, promote, readonly, receive, release, rename, rollback, send, share, snapshot, unallow ]
elements: str
local:
description:
@ -248,10 +249,7 @@ def main():
users=dict(type='list', elements='str'),
groups=dict(type='list', elements='str'),
everyone=dict(type='bool', default=False),
permissions=dict(type='list', elements='str',
choices=['allow', 'clone', 'create', 'destroy', 'diff', 'hold', 'mount', 'promote',
'readonly', 'receive', 'release', 'rename', 'rollback', 'send', 'share',
'snapshot', 'unallow']),
permissions=dict(type='list', elements='str'),
local=dict(type='bool'),
descendents=dict(type='bool'),
recursive=dict(type='bool', default=False),