]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph_volume: perserve newlines in stdout and stderr when zapping
authorAndrew Schoen <aschoen@redhat.com>
Wed, 28 Mar 2018 16:10:17 +0000 (11:10 -0500)
committerSébastien Han <seb@redhat.com>
Tue, 10 Apr 2018 12:19:21 +0000 (14:19 +0200)
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 <aschoen@redhat.com>
library/ceph_volume.py

index b1879576786d322548e6b6f1719d292963029f65..7a1b04f0c93c93b2df18caba1cce462082e2fadd 100644 (file)
@@ -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),