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,24 +102,29 @@ results:
description: results from actions taken description: results from actions taken
returned: always returned: always
type: complex type: complex
sample: { contains:
"attempts": 1, name:
"changed": true, description: Name of the service
"name": "apache2", type: str
"status": { returned: always
"enabled": { sample: "apache2"
"changed": true, status:
"rc": 0, description: Status of the service
"stderr": "", type: dict
"stdout": "" returned: changed
}, sample: {
"stopped": { "enabled": {
"changed": true, "changed": true,
"rc": 0, "rc": 0,
"stderr": "", "stderr": "",
"stdout": "Stopping web server: apache2.\n" "stdout": ""
} },
} "stopped": {
"changed": true,
"rc": 0,
"stderr": "",
"stdout": "Stopping web server: apache2.\n"
}
} }
''' '''

@ -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