hashicorp / packer-plugin-ansible

Packer plugin for Ansible Provisioner
https://www.packer.io/docs/provisioners/ansible
Mozilla Public License 2.0
49 stars 36 forks source link

Packer suppresses ANSI color encoding from ansible output #16

Open ghost opened 3 years ago

ghost commented 3 years ago

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

joewragg commented 2 years ago

Yep would be nice to see the colour.

ionut-maxim commented 2 years ago

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.