packer-plugin-ansible icon indicating copy to clipboard operation
packer-plugin-ansible copied to clipboard

Packer suppresses ANSI color encoding from ansible output

Open ghost opened this issue 5 years ago • 2 comments

This issue was originally opened by @queglay as hashicorp/packer#10348. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview of the Issue

Packer suppresses ANSI color encoding. When using provisioners like Ansible, some very long logs can be output and without the color it's difficult to determine where something went wrong.

Reproduction Steps

Build anything with Ansible. Any colors that would normally be output are not visible.

Packer version

1.6.4

ghost avatar Apr 16 '21 18:04 ghost

Yep would be nice to see the colour.

joewragg avatar Oct 11 '21 14:10 joewragg

Yeah, this is still an issue with version 1.7.8.

[EDIT] Passing ansible_env_vars = ["ANSIBLE_FORCE_COLOR=1"] to the ansible provisioner fixes it for me.

ionut-maxim avatar Dec 09 '21 21:12 ionut-maxim