mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
[PR #9351/4b23e5ec backport][stable-9] s[o-y]*: normalize docs (#9368)
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>
(cherry picked from commit 4b23e5ecff
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
e120c64a21
commit
595c105a29
20 changed files with 994 additions and 1174 deletions
|
@ -8,60 +8,55 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: svc
|
||||
author:
|
||||
- Brian Coca (@bcoca)
|
||||
- Brian Coca (@bcoca)
|
||||
short_description: Manage daemontools services
|
||||
description:
|
||||
- Controls daemontools services on remote hosts using the svc utility.
|
||||
- Controls daemontools services on remote hosts using the svc utility.
|
||||
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 the service to manage.
|
||||
type: str
|
||||
required: true
|
||||
state:
|
||||
description:
|
||||
- V(started)/V(stopped) are idempotent actions that will not run
|
||||
commands unless necessary. V(restarted) will always bounce the
|
||||
svc (svc -t) and V(killed) will always bounce the svc (svc -k).
|
||||
V(reloaded) will send a sigusr1 (svc -1).
|
||||
V(once) will run a normally downed svc once (svc -o), not really
|
||||
an idempotent operation.
|
||||
type: str
|
||||
choices: [ killed, once, reloaded, restarted, started, stopped ]
|
||||
downed:
|
||||
description:
|
||||
- Should a 'down' file exist or not, if it exists it disables auto startup.
|
||||
Defaults to no. Downed does not imply stopped.
|
||||
type: bool
|
||||
enabled:
|
||||
description:
|
||||
- Whether the service is enabled or not, if disabled it also implies stopped.
|
||||
Take note that a service can be enabled and downed (no auto restart).
|
||||
type: bool
|
||||
service_dir:
|
||||
description:
|
||||
- Directory svscan watches for services
|
||||
type: str
|
||||
default: /service
|
||||
service_src:
|
||||
description:
|
||||
- Directory where services are defined, the source of symlinks to service_dir.
|
||||
type: str
|
||||
default: /etc/service
|
||||
'''
|
||||
name:
|
||||
description:
|
||||
- Name of the service to manage.
|
||||
type: str
|
||||
required: true
|
||||
state:
|
||||
description:
|
||||
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. V(restarted) will always bounce the svc (svc
|
||||
-t) and V(killed) will always bounce the svc (svc -k). V(reloaded) will send a sigusr1 (svc -1). V(once) will run a normally downed svc
|
||||
once (svc -o), not really an idempotent operation.
|
||||
type: str
|
||||
choices: [killed, once, reloaded, restarted, started, stopped]
|
||||
downed:
|
||||
description:
|
||||
- Should a 'down' file exist or not, if it exists it disables auto startup. Defaults to no. Downed does not imply stopped.
|
||||
type: bool
|
||||
enabled:
|
||||
description:
|
||||
- Whether the service is enabled or not, if disabled it also implies stopped. Take note that a service can be enabled and downed (no auto
|
||||
restart).
|
||||
type: bool
|
||||
service_dir:
|
||||
description:
|
||||
- Directory svscan watches for services.
|
||||
type: str
|
||||
default: /service
|
||||
service_src:
|
||||
description:
|
||||
- Directory where services are defined, the source of symlinks to O(service_dir).
|
||||
type: str
|
||||
default: /etc/service
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Start svc dnscache, if not running
|
||||
community.general.svc:
|
||||
name: dnscache
|
||||
|
@ -92,7 +87,7 @@ EXAMPLES = '''
|
|||
name: dnscache
|
||||
state: reloaded
|
||||
service_dir: /var/service
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue