From 682b98756709c78b29410b584a92ef2944675441 Mon Sep 17 00:00:00 2001 From: Shawn Siefkas Date: Tue, 13 Jan 2015 13:26:52 -0600 Subject: [PATCH] Add stdout_lines to results when using with_items --- lib/ansible/runner/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index b926caf8276..c7c439aefd2 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -817,6 +817,10 @@ class Runner(object): port, complex_args=complex_args ) + + if 'stdout' in result.result and 'stdout_lines' not in result.result: + result.result['stdout_lines'] = result.result['stdout'].splitlines() + results.append(result.result) if result.comm_ok == False: all_comm_ok = False