mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Fix parameter types and other fixes (#50111)
* Fix parameter types and other fixes * Fix issues after review * Fix Windows-references in system/files modules This PR includes: - Replacing version/v with just Ansible X.Y - Removing Windows-alternatives from notes * Update lib/ansible/modules/system/parted.py Co-Authored-By: dagwieers <dag@wieers.com> * Update lib/ansible/modules/system/service.py Co-Authored-By: dagwieers <dag@wieers.com> * Update lib/ansible/modules/system/service.py Co-Authored-By: dagwieers <dag@wieers.com> * Revert type change, move to separate PR * Update lib/ansible/modules/files/replace.py Co-Authored-By: dagwieers <dag@wieers.com> * Update lib/ansible/modules/files/replace.py Co-Authored-By: dagwieers <dag@wieers.com> * Update lib/ansible/modules/files/replace.py Co-Authored-By: dagwieers <dag@wieers.com> * Update lib/ansible/modules/files/replace.py Co-Authored-By: dagwieers <dag@wieers.com> * Update lib/ansible/modules/files/replace.py Co-Authored-By: dagwieers <dag@wieers.com> * Update lib/ansible/modules/files/replace.py Co-Authored-By: dagwieers <dag@wieers.com>
This commit is contained in:
parent
b834b29e43
commit
30227ace98
43 changed files with 1222 additions and 1065 deletions
|
@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
'status': ['stableinterface'],
|
||||
'supported_by': 'core'}
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: service
|
||||
version_added: "0.1"
|
||||
|
@ -24,52 +24,60 @@ options:
|
|||
name:
|
||||
description:
|
||||
- Name of the service.
|
||||
type: str
|
||||
required: true
|
||||
state:
|
||||
description:
|
||||
- C(started)/C(stopped) are idempotent actions that will not run
|
||||
commands unless necessary. C(restarted) will always bounce the
|
||||
service. C(reloaded) will always reload. B(At least one of state
|
||||
and enabled are required.) Note that reloaded will start the
|
||||
service if it is not already started, even if your chosen init
|
||||
system wouldn't normally.
|
||||
commands unless necessary.
|
||||
- C(restarted) will always bounce the service.
|
||||
- C(reloaded) will always reload.
|
||||
- B(At least one of state and enabled are required.)
|
||||
- Note that reloaded will start the service if it is not already started,
|
||||
even if your chosen init system wouldn't normally.
|
||||
type: str
|
||||
choices: [ reloaded, restarted, started, stopped ]
|
||||
sleep:
|
||||
description:
|
||||
- If the service is being C(restarted) then sleep this many seconds
|
||||
between the stop and start command. This helps to workaround badly
|
||||
behaving init scripts that exit immediately after signaling a process
|
||||
to stop.
|
||||
between the stop and start command.
|
||||
- This helps to work around badly-behaving init scripts that exit immediately
|
||||
after signaling a process to stop.
|
||||
type: int
|
||||
version_added: "1.3"
|
||||
pattern:
|
||||
description:
|
||||
- If the service does not respond to the status command, name a
|
||||
substring to look for as would be found in the output of the I(ps)
|
||||
command as a stand-in for a status result. If the string is found,
|
||||
the service will be assumed to be started.
|
||||
command as a stand-in for a status result.
|
||||
- If the string is found, the service will be assumed to be started.
|
||||
type: str
|
||||
version_added: "0.7"
|
||||
enabled:
|
||||
description:
|
||||
- Whether the service should start on boot. B(At least one of state and
|
||||
enabled are required.)
|
||||
- Whether the service should start on boot.
|
||||
- B(At least one of state and enabled are required.)
|
||||
type: bool
|
||||
runlevel:
|
||||
description:
|
||||
- "For OpenRC init scripts (ex: Gentoo) only. The runlevel that this service belongs to."
|
||||
- For OpenRC init scripts (e.g. Gentoo) only.
|
||||
- The runlevel that this service belongs to.
|
||||
type: str
|
||||
default: default
|
||||
arguments:
|
||||
description:
|
||||
- Additional arguments provided on the command line
|
||||
- Additional arguments provided on the command line.
|
||||
type: str
|
||||
aliases: [ args ]
|
||||
use:
|
||||
description:
|
||||
- The service module actually uses system specific modules, normally through auto detection, this setting can force a specific module.
|
||||
- Normally it uses the value of the 'ansible_service_mgr' fact and falls back to the old 'service' module when none matching is found.
|
||||
type: str
|
||||
default: auto
|
||||
version_added: 2.2
|
||||
notes:
|
||||
- For AIX group subsystem names can be used.
|
||||
- For Windows targets, use the M(win_service) module instead.
|
||||
- For AIX, group subsystem names can be used.
|
||||
seealso:
|
||||
- module: win_service
|
||||
author:
|
||||
|
@ -77,7 +85,7 @@ author:
|
|||
- Michael DeHaan
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r'''
|
||||
- name: Start service httpd, if not started
|
||||
service:
|
||||
name: httpd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue