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:
parent
ec9e10d6d1
commit
202cabc769
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/5147-terraform-init-no-color.yml
Normal file
2
changelogs/fragments/5147-terraform-init-no-color.yml
Normal 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).
|
|
@ -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):
|
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:
|
if backend_config:
|
||||||
for key, val in backend_config.items():
|
for key, val in backend_config.items():
|
||||||
command.extend([
|
command.extend([
|
||||||
|
|
Loading…
Reference in a new issue