s[o-y]*: normalize docs (#9351)

* s[o-y]*: normalize docs

* Apply suggestions from code review

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

* Update plugins/modules/spectrum_model_attrs.py

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2024-12-25 21:48:22 +13:00 committed by GitHub
parent 6cd3f79e19
commit 4b23e5ecff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 994 additions and 1174 deletions

View file

@ -9,64 +9,62 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
author:
- David Lundgren (@dlundgren)
- David Lundgren (@dlundgren)
module: sysrc
short_description: Manage FreeBSD using sysrc
version_added: '2.0.0'
description:
- Manages C(/etc/rc.conf) for FreeBSD.
- Manages C(/etc/rc.conf) for FreeBSD.
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:
description:
- Name of variable in C(/etc/rc.conf) to manage.
type: str
required: true
value:
description:
- The value to set when O(state=present).
- The value to add when O(state=value_present).
- The value to remove when O(state=value_absent).
type: str
state:
description:
- Use V(present) to add the variable.
- Use V(absent) to remove the variable.
- Use V(value_present) to add the value to the existing variable.
- Use V(value_absent) to remove the value from the existing variable.
type: str
default: "present"
choices: [ absent, present, value_present, value_absent ]
path:
description:
- Path to file to use instead of V(/etc/rc.conf).
type: str
default: "/etc/rc.conf"
delim:
description:
- Delimiter to be used instead of V(" ") (space).
- Only used when O(state=value_present) or O(state=value_absent).
default: " "
type: str
jail:
description:
- Name or ID of the jail to operate on.
type: str
name:
description:
- Name of variable in C(/etc/rc.conf) to manage.
type: str
required: true
value:
description:
- The value to set when O(state=present).
- The value to add when O(state=value_present).
- The value to remove when O(state=value_absent).
type: str
state:
description:
- Use V(present) to add the variable.
- Use V(absent) to remove the variable.
- Use V(value_present) to add the value to the existing variable.
- Use V(value_absent) to remove the value from the existing variable.
type: str
default: "present"
choices: [absent, present, value_present, value_absent]
path:
description:
- Path to file to use instead of V(/etc/rc.conf).
type: str
default: "/etc/rc.conf"
delim:
description:
- Delimiter to be used instead of V(" ") (space).
- Only used when O(state=value_present) or O(state=value_absent).
default: " "
type: str
jail:
description:
- Name or ID of the jail to operate on.
type: str
notes:
- The O(name) cannot contain periods as sysrc does not support OID style names.
'''
"""
EXAMPLES = r'''
---
EXAMPLES = r"""
# enable mysql in the /etc/rc.conf
- name: Configure mysql pid file
community.general.sysrc:
@ -94,15 +92,15 @@ EXAMPLES = r'''
name: nginx_enable
value: "YES"
jail: testjail
'''
"""
RETURN = r'''
RETURN = r"""
changed:
description: Return changed for sysrc actions.
returned: always
type: bool
sample: true
'''
"""
from ansible.module_utils.basic import AnsibleModule
import re