summaryrefslogtreecommitdiffstats
path: root/lib/ansible/modules/sysvinit.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:55:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:55:42 +0000
commit62d9962ec7d01c95bf5732169320d3857a41446e (patch)
treef60d8fc63ff738e5f5afec48a84cf41480ee1315 /lib/ansible/modules/sysvinit.py
parentReleasing progress-linux version 2.14.13-1~progress7.99u1. (diff)
downloadansible-core-62d9962ec7d01c95bf5732169320d3857a41446e.tar.xz
ansible-core-62d9962ec7d01c95bf5732169320d3857a41446e.zip
Merging upstream version 2.16.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ansible/modules/sysvinit.py')
-rw-r--r--lib/ansible/modules/sysvinit.py47
1 files changed, 26 insertions, 21 deletions
diff --git a/lib/ansible/modules/sysvinit.py b/lib/ansible/modules/sysvinit.py
index b3b9c10..fc934d3 100644
--- a/lib/ansible/modules/sysvinit.py
+++ b/lib/ansible/modules/sysvinit.py
@@ -26,8 +26,8 @@ options:
state:
choices: [ 'started', 'stopped', 'restarted', 'reloaded' ]
description:
- - C(started)/C(stopped) are idempotent actions that will not run commands unless necessary.
- Not all init scripts support C(restarted) nor C(reloaded) natively, so these will both trigger a stop and start as needed.
+ - V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
+ Not all init scripts support V(restarted) nor V(reloaded) natively, so these will both trigger a stop and start as needed.
type: str
enabled:
type: bool
@@ -36,7 +36,7 @@ options:
sleep:
default: 1
description:
- - If the service is being C(restarted) or C(reloaded) then sleep this many seconds between the stop and start command.
+ - If the service is being V(restarted) or V(reloaded) then sleep this many seconds between the stop and start command.
This helps to workaround badly behaving services.
type: int
pattern:
@@ -102,24 +102,29 @@ results:
description: results from actions taken
returned: always
type: complex
- sample: {
- "attempts": 1,
- "changed": true,
- "name": "apache2",
- "status": {
- "enabled": {
- "changed": true,
- "rc": 0,
- "stderr": "",
- "stdout": ""
- },
- "stopped": {
- "changed": true,
- "rc": 0,
- "stderr": "",
- "stdout": "Stopping web server: apache2.\n"
- }
- }
+ contains:
+ name:
+ description: Name of the service
+ type: str
+ returned: always
+ sample: "apache2"
+ status:
+ description: Status of the service
+ type: dict
+ returned: changed
+ sample: {
+ "enabled": {
+ "changed": true,
+ "rc": 0,
+ "stderr": "",
+ "stdout": ""
+ },
+ "stopped": {
+ "changed": true,
+ "rc": 0,
+ "stderr": "",
+ "stdout": "Stopping web server: apache2.\n"
+ }
}
'''