From 62d9962ec7d01c95bf5732169320d3857a41446e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:55:42 +0200 Subject: Merging upstream version 2.16.5. Signed-off-by: Daniel Baumann --- lib/ansible/modules/sysvinit.py | 47 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'lib/ansible/modules/sysvinit.py') 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" + } } ''' -- cgit v1.2.3