mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
[PR #9388/6aadcc72 backport][stable-10] [mem ... n]*.py: normalize docs (#9406)
[mem ... n]*.py: normalize docs (#9388)
* [mem ... n]*.py: normalize docs
* Update plugins/modules/netcup_dns.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* netcup_dns: change type of RV(records)
From complex to list of dicts.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6aadcc72d1
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
03f3b74934
commit
7732d64abb
25 changed files with 2245 additions and 2342 deletions
|
@ -8,59 +8,58 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: modprobe
|
||||
short_description: Load or unload kernel modules
|
||||
author:
|
||||
- David Stygstra (@stygstra)
|
||||
- Julien Dauphant (@jdauphant)
|
||||
- Matt Jeffery (@mattjeffery)
|
||||
- David Stygstra (@stygstra)
|
||||
- Julien Dauphant (@jdauphant)
|
||||
- Matt Jeffery (@mattjeffery)
|
||||
description:
|
||||
- Load or unload kernel modules.
|
||||
- Load or unload kernel modules.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
check_mode:
|
||||
support: full
|
||||
diff_mode:
|
||||
support: none
|
||||
check_mode:
|
||||
support: full
|
||||
diff_mode:
|
||||
support: none
|
||||
options:
|
||||
name:
|
||||
type: str
|
||||
required: true
|
||||
description:
|
||||
- Name of kernel module to manage.
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- Whether the module should be present or absent.
|
||||
choices: [ absent, present ]
|
||||
default: present
|
||||
params:
|
||||
type: str
|
||||
description:
|
||||
- Modules parameters.
|
||||
default: ''
|
||||
persistent:
|
||||
type: str
|
||||
choices: [ disabled, absent, present ]
|
||||
default: disabled
|
||||
version_added: 7.0.0
|
||||
description:
|
||||
- Persistency between reboots for configured module.
|
||||
- This option creates files in C(/etc/modules-load.d/) and C(/etc/modprobe.d/) that make your module configuration persistent during reboots.
|
||||
- If V(present), adds module name to C(/etc/modules-load.d/) and params to C(/etc/modprobe.d/) so the module will be loaded on next reboot.
|
||||
- If V(absent), will comment out module name from C(/etc/modules-load.d/) and comment out params from C(/etc/modprobe.d/) so the module will not be
|
||||
loaded on next reboot.
|
||||
- If V(disabled), will not touch anything and leave C(/etc/modules-load.d/) and C(/etc/modprobe.d/) as it is.
|
||||
- Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded in the
|
||||
kernel modules themselves instead of configuration like this.
|
||||
- In fact, most modern kernel modules are prepared for automatic loading already.
|
||||
- "B(Note:) This option works only with distributions that use C(systemd) when set to values other than V(disabled)."
|
||||
'''
|
||||
name:
|
||||
type: str
|
||||
required: true
|
||||
description:
|
||||
- Name of kernel module to manage.
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- Whether the module should be present or absent.
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
params:
|
||||
type: str
|
||||
description:
|
||||
- Modules parameters.
|
||||
default: ''
|
||||
persistent:
|
||||
type: str
|
||||
choices: [disabled, absent, present]
|
||||
default: disabled
|
||||
version_added: 7.0.0
|
||||
description:
|
||||
- Persistency between reboots for configured module.
|
||||
- This option creates files in C(/etc/modules-load.d/) and C(/etc/modprobe.d/) that make your module configuration persistent during reboots.
|
||||
- If V(present), adds module name to C(/etc/modules-load.d/) and params to C(/etc/modprobe.d/) so the module will be loaded on next reboot.
|
||||
- If V(absent), will comment out module name from C(/etc/modules-load.d/) and comment out params from C(/etc/modprobe.d/) so the module
|
||||
will not be loaded on next reboot.
|
||||
- If V(disabled), will not touch anything and leave C(/etc/modules-load.d/) and C(/etc/modprobe.d/) as it is.
|
||||
- Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded
|
||||
in the kernel modules themselves instead of configuration like this.
|
||||
- In fact, most modern kernel modules are prepared for automatic loading already.
|
||||
- B(Note:) This option works only with distributions that use C(systemd) when set to values other than V(disabled).
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Add the 802.1q module
|
||||
community.general.modprobe:
|
||||
name: 8021q
|
||||
|
@ -78,7 +77,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
params: 'numdummies=2'
|
||||
persistent: present
|
||||
'''
|
||||
"""
|
||||
|
||||
import os.path
|
||||
import platform
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue