octplane/ansible_stdout_compact_logger

Color output in Jenkins not working but showing boxes.

Closed this issue · 4 comments

I am using Ansible 7.0.0 with Jenkins 2.381

When executing Ansible in a docker container the output of the default stdout-callback was uncolored in my Jenkins environment. The container is started without the "--tty" option of Docker.
When executing the same playbook on a console I get colored output.

With this plugin I get colored output on a normal console, but in Jenkins the output contains additional characters, that cannot be displayed. See the little boxes with question marks in the screenshot.

image

I would expect that in case color output is not supported in the environment (what is the case here obviously), the log output is just monochrome. Same behaviour as the default log output of Ansible.

Am I doing something wrong here or is it a bug or an unsupported use case?

Anyway, I like this plugin very much. Thanks for the great work!

Hello, can you try the PR referenced?

Hello, can you try the PR referenced?

I just tested the PR. No more boxes in the log. Works great.

Good! Merging now. Thanks for your feedback.

Actually, I'll merge later as I managed to create conflicts 🙈