From 36e71f6532062cfc2e0ce6a3ce9ccaf5537418ea Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 28 Mar 2018 11:10:17 -0500 Subject: [PATCH] ceph_volume: perserve newlines in stdout and stderr when zapping Because we have many commands we might need to run the ANSIBLE_STDOUT_CALLBACK won't format these nicely because we're not reporting these back at the root level of the json result. Signed-off-by: Andrew Schoen --- library/ceph_volume.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ceph_volume.py b/library/ceph_volume.py index b18795767..7a1b04f0c 100644 --- a/library/ceph_volume.py +++ b/library/ceph_volume.py @@ -329,8 +329,8 @@ def remove_osd(module): cmd_result = dict( cmd=cmd, - stdout=out.rstrip(b"\r\n"), - stderr=err.rstrip(b"\r\n"), + stdout_lines=out.split("\n"), + stderr_lines=err.split("\n"), rc=rc, start=str(startd), end=str(endd),