v0.11.13
Currently its very hard to read ansible output when provisioning within terraform because all the colours are removed. This also makes it difficult to detect warnings and errors at times.
It would be great to enable ansible output colour in the shell by default when being used in a local or remote exec.
Is it possible to achieve any workaround for this ability?
My workaround was to use ANSIBLE_FORCE_COLOR=1
provisioner "local-exec" {
command = "ANSIBLE_FORCE_COLOR=1 ansible-playbook --ssh-extra-args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' -u ${var.ssh_user} --private-key ${var.shared_key_path} -i ansible/inventory ansible/playbook.yml"
}
Fantastic! Thanks @nickkadams!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
My workaround was to use ANSIBLE_FORCE_COLOR=1