From 344c9761413eb8fea233d08b6541d30e85b78f08 Mon Sep 17 00:00:00 2001 From: Leonardo Giordani Date: Thu, 25 Feb 2016 10:42:54 +0100 Subject: [PATCH] Added some documentation for the shell return values --- lib/ansible/modules/commands/shell.py | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/lib/ansible/modules/commands/shell.py b/lib/ansible/modules/commands/shell.py index 840296cc182..96bbae5e296 100644 --- a/lib/ansible/modules/commands/shell.py +++ b/lib/ansible/modules/commands/shell.py @@ -99,3 +99,51 @@ EXAMPLES = ''' args: executable: /bin/bash ''' + +RETURN = ''' +msg: + description: changed + returned: always + type: boolean + sample: True +start: + description: The command execution start time + returned: always + type: string + sample: '2016-02-25 09:18:26.429568' +end: + description: The command execution end time + returned: always + type: string + sample: '2016-02-25 09:18:26.755339' +delta: + description: The command execution delta time + returned: always + type: string + sample: '0:00:00.325771' +stdout: + description: The command standard output + returned: always + type: string + sample: 'Clustering node rabbit@slave1 with rabbit@master ...' +stderr: + description: The command standard error + returned: always + type: string + sample: 'ls: cannot access foo: No such file or directory' +cmd: + description: The command executed by the task + returned: always + type: string + sample: 'rabbitmqctl join_cluster rabbit@master' +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 of strings + sample: [u'Clustering node rabbit@slave1 with rabbit@master ...'] +''' \ No newline at end of file