mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
c*.py: normalize docs (#9418)
* c*.py: normalize docs * fix copy/paste mistake * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
912065ad0e
commit
43599c6850
36 changed files with 1437 additions and 1614 deletions
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: crypttab
|
||||
short_description: Encrypted Linux block devices
|
||||
description:
|
||||
|
@ -24,31 +23,27 @@ attributes:
|
|||
options:
|
||||
name:
|
||||
description:
|
||||
- Name of the encrypted block device as it appears in the C(/etc/crypttab) file, or
|
||||
optionally prefixed with V(/dev/mapper/), as it appears in the filesystem. V(/dev/mapper/)
|
||||
will be stripped from O(name).
|
||||
- Name of the encrypted block device as it appears in the C(/etc/crypttab) file, or optionally prefixed with V(/dev/mapper/),
|
||||
as it appears in the filesystem. V(/dev/mapper/) will be stripped from O(name).
|
||||
type: str
|
||||
required: true
|
||||
state:
|
||||
description:
|
||||
- Use V(present) to add a line to C(/etc/crypttab) or update its definition
|
||||
if already present.
|
||||
- Use V(present) to add a line to C(/etc/crypttab) or update its definition if already present.
|
||||
- Use V(absent) to remove a line with matching O(name).
|
||||
- Use V(opts_present) to add options to those already present; options with
|
||||
different values will be updated.
|
||||
- Use V(opts_present) to add options to those already present; options with different values will be updated.
|
||||
- Use V(opts_absent) to remove options from the existing set.
|
||||
type: str
|
||||
required: true
|
||||
choices: [ absent, opts_absent, opts_present, present ]
|
||||
choices: [absent, opts_absent, opts_present, present]
|
||||
backing_device:
|
||||
description:
|
||||
- Path to the underlying block device or file, or the UUID of a block-device
|
||||
prefixed with V(UUID=).
|
||||
- Path to the underlying block device or file, or the UUID of a block-device prefixed with V(UUID=).
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
- Encryption password, the path to a file containing the password, or
|
||||
V(-) or unset if the password should be entered at boot.
|
||||
- Encryption password, the path to a file containing the password, or V(-) or unset if the password should be entered
|
||||
at boot.
|
||||
type: path
|
||||
opts:
|
||||
description:
|
||||
|
@ -61,10 +56,10 @@ options:
|
|||
type: path
|
||||
default: /etc/crypttab
|
||||
author:
|
||||
- Steve (@groks)
|
||||
'''
|
||||
- Steve (@groks)
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Set the options explicitly a device which must already exist
|
||||
community.general.crypttab:
|
||||
name: luks-home
|
||||
|
@ -78,7 +73,7 @@ EXAMPLES = r'''
|
|||
opts: discard
|
||||
loop: '{{ ansible_mounts }}'
|
||||
when: "'/dev/mapper/luks-' in {{ item.device }}"
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
import traceback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue