[doc] Set consistent return codes for modules (#67444)

Set consistent possible return codes for these similar two modules.
pull/67506/head
Baptiste Mille-Mathias 6 years ago committed by GitHub
parent cbc38d2e5a
commit bb70c0b996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -149,28 +149,58 @@ EXAMPLES = r'''
''' '''
RETURN = r''' RETURN = r'''
cmd: msg:
description: the cmd that was run on the remote machine description: changed
returned: always returned: always
type: list type: bool
sample: sample: True
- echo start:
- hello description: The command execution start time
delta:
description: cmd end time - cmd start time
returned: always returned: always
type: str type: str
sample: 0:00:00.001529 sample: '2017-09-29 22:03:48.083128'
end: end:
description: cmd end time description: The command execution end time
returned: always returned: always
type: str type: str
sample: '2017-09-29 22:03:48.084657' sample: '2017-09-29 22:03:48.084657'
start: delta:
description: cmd start time description: The command execution delta time
returned: always returned: always
type: str type: str
sample: '2017-09-29 22:03:48.083128' sample: '0:00:00.001529'
stdout:
description: The command standard output
returned: always
type: str
sample: 'Clustering node rabbit@slave1 with rabbit@master …'
stderr:
description: The command standard error
returned: always
type: str
sample: 'ls cannot access foo: No such file or directory'
cmd:
description: The command executed by the task
returned: always
type: list
sample:
- echo
- hello
rc:
description: The command return code (0 means success)
returned: always
type: int
sample: 0
stdout_lines:
description: The command standard output split in lines
returned: always
type: list
sample: [u'Clustering node rabbit@slave1 with rabbit@master …']
stderr_lines:
description: The command standard error split in lines
returned: always
type: list
sample: [u'ls cannot access foo: No such file or directory', u'ls …']
''' '''
import datetime import datetime

@ -184,7 +184,7 @@ stdout:
description: The command standard output description: The command standard output
returned: always returned: always
type: str type: str
sample: 'Clustering node rabbit@slave1 with rabbit@master ...' sample: 'Clustering node rabbit@slave1 with rabbit@master '
stderr: stderr:
description: The command standard error description: The command standard error
returned: always returned: always
@ -204,5 +204,10 @@ stdout_lines:
description: The command standard output split in lines description: The command standard output split in lines
returned: always returned: always
type: list type: list
sample: [u'Clustering node rabbit@slave1 with rabbit@master ...'] sample: [u'Clustering node rabbit@slave1 with rabbit@master …']
stderr_lines:
description: The command standard error split in lines
returned: always
type: list
sample: [u'ls cannot access foo: No such file or directory', u'ls …']
''' '''

Loading…
Cancel
Save