Decode stdout from ansible-playbook before logging

We log ansible parse errors specially, but the current loop
produces a bunch of lines with b'' which isn't as nice looking
as it should be.

Change-Id: I3e62e6a938422ee02099b2dfe3e1350311c722b4
This commit is contained in:
Monty Taylor 2017-09-10 16:58:30 -06:00
parent 25796c229c
commit 12f321f6a5
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 2 additions and 1 deletions

View File

@ -1617,7 +1617,8 @@ class AnsibleJob(object):
now=datetime.datetime.now()))
for line in syntax_buffer:
job_output.write("{now} | {line}\n".format(
now=datetime.datetime.now(), line=line))
now=datetime.datetime.now(),
line=line.decode('utf-8').rstrip()))
return (self.RESULT_NORMAL, ret)