Improved return docs (#81006)

* Improved the return docs for modules `sysvinit`
  and `systemd_service`

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/81061/head
Abhijeet Kasurde 3 years ago committed by GitHub
parent f13e35cbf9
commit cf803d6d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -151,7 +151,7 @@ RETURN = '''
status: status:
description: A dictionary with the key=value pairs returned from C(systemctl show). description: A dictionary with the key=value pairs returned from C(systemctl show).
returned: success returned: success
type: complex type: dict
sample: { sample: {
"ActiveEnterTimestamp": "Sun 2016-05-15 18:28:49 EDT", "ActiveEnterTimestamp": "Sun 2016-05-15 18:28:49 EDT",
"ActiveEnterTimestampMonotonic": "8135942", "ActiveEnterTimestampMonotonic": "8135942",

@ -102,11 +102,17 @@ results:
description: results from actions taken description: results from actions taken
returned: always returned: always
type: complex type: complex
contains:
name:
description: Name of the service
type: str
returned: always
sample: "apache2"
status:
description: Status of the service
type: dict
returned: changed
sample: { sample: {
"attempts": 1,
"changed": true,
"name": "apache2",
"status": {
"enabled": { "enabled": {
"changed": true, "changed": true,
"rc": 0, "rc": 0,
@ -120,7 +126,6 @@ results:
"stdout": "Stopping web server: apache2.\n" "stdout": "Stopping web server: apache2.\n"
} }
} }
}
''' '''
import re import re

@ -50,8 +50,6 @@ lib/ansible/modules/service.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/service.py validate-modules:use-run-command-not-popen lib/ansible/modules/service.py validate-modules:use-run-command-not-popen
lib/ansible/modules/stat.py validate-modules:parameter-invalid lib/ansible/modules/stat.py validate-modules:parameter-invalid
lib/ansible/modules/systemd_service.py validate-modules:parameter-invalid lib/ansible/modules/systemd_service.py validate-modules:parameter-invalid
lib/ansible/modules/systemd_service.py validate-modules:return-syntax-error
lib/ansible/modules/sysvinit.py validate-modules:return-syntax-error
lib/ansible/modules/uri.py validate-modules:doc-required-mismatch lib/ansible/modules/uri.py validate-modules:doc-required-mismatch
lib/ansible/modules/user.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/user.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/user.py validate-modules:use-run-command-not-popen lib/ansible/modules/user.py validate-modules:use-run-command-not-popen

Loading…
Cancel
Save