summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/sysvinit.py
diff options
context:
space:
mode:
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 b3b9c10c..fc934d35 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"
+ }
}
'''