1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

terraform: run init with no-color, too (#5147)

* terraform: run `init` with no-color, too

When running `terraform init` fails, it would output ansi color sequences, making the output hard to read.

Maybe setting TF_IN_AUTOMATION would also be beneficial: https://www.terraform.io/cli/config/environment-variables#tf_in_automation

* add changelog fragment for `terraform init -no-color`

* move changelog into correct directory; add PR link
This commit is contained in:
azrdev 2022-10-01 10:25:12 +02:00 committed by GitHub
parent ec9e10d6d1
commit 202cabc769
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- terraform - run ``terraform init`` with ``-no-color`` not to mess up the stdout of the task (https://github.com/ansible-collections/community.general/pull/5147).

View file

@ -273,7 +273,7 @@ def _state_args(state_file):
def init_plugins(bin_path, project_path, backend_config, backend_config_files, init_reconfigure, provider_upgrade, plugin_paths):
command = [bin_path, 'init', '-input=false']
command = [bin_path, 'init', '-input=false', '-no-color']
if backend_config:
for key, val in backend_config.items():
command.extend([