mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Various module doc fixes (#37256)
This PR includes: - A fix for multiple-choice defaults - A fix for messed up dictionary samples - Cleaner defaults when they don't appear part of choices
This commit is contained in:
parent
b945846814
commit
80ba7b7402
3 changed files with 74 additions and 68 deletions
|
@ -49,11 +49,63 @@ EXAMPLES = '''
|
|||
|
||||
# Gather space usage about all imported ZFS pools
|
||||
- zpool_facts: properties='free,size'
|
||||
debug: msg='ZFS pool {{ item.name }} has {{ item.free }} free space out of {{ item.size }}.'
|
||||
|
||||
- debug: msg='ZFS pool {{ item.name }} has {{ item.free }} free space out of {{ item.size }}.'
|
||||
with_items: '{{ ansible_zfs_pools }}'
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
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: string
|
||||
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
|
||||
|
@ -64,52 +116,6 @@ parsable:
|
|||
returned: if 'parsable' is set to True
|
||||
type: boolean
|
||||
sample: True
|
||||
zfs_pools:
|
||||
description: ZFS pool facts
|
||||
returned: always
|
||||
type: string
|
||||
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": "-"
|
||||
}
|
||||
'''
|
||||
|
||||
from collections import defaultdict
|
||||
|
|
|
@ -56,8 +56,8 @@ options:
|
|||
C(ObjectInherit).
|
||||
- For more information on the choices see MSDN InheritanceFlags enumeration
|
||||
at U(https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags.aspx).
|
||||
choices: [ ContainerInherit, None, ObjectInherit ]
|
||||
default: For Leaf File, 'None'; For Directory, 'ContainerInherit, ObjectInherit';
|
||||
- Defaults to C(ContainerInherit, ObjectInherit) for Directories.
|
||||
choices: [ ContainerInherit, ObjectInherit ]
|
||||
propagation:
|
||||
description:
|
||||
- Propagation flag on the ACL rules.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue