From 1dec603074a6053dd0c49fd9fba6bcfc34e4e93f Mon Sep 17 00:00:00 2001 From: ogrechko Date: Sun, 28 Dec 2025 08:15:41 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20ansible/deploy=5Fall.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/deploy_all.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/ansible/deploy_all.yml b/ansible/deploy_all.yml index 4a51844..7c71853 100644 --- a/ansible/deploy_all.yml +++ b/ansible/deploy_all.yml @@ -4,15 +4,28 @@ connection: local gather_facts: false tasks: + - name: Create terraform mirror config locally + copy: + dest: "{{ playbook_dir }}/../terraform/.terraformrc" # Кладем прямо в папку с кодом + content: | + provider_installation { + network_mirror { + url = "https://terraform-mirror.yandexcloud.net/" + } + direct { + exclude = ["registry.terraform.io/*/*"] + } + } + - name: Run Terraform Apply community.general.terraform: - project_path: "{{ playbook_dir }}/../terraform" # путь к папке с .tf файлами в вашем репозитории + project_path: "{{ playbook_dir }}/../terraform" state: present force_init: true - init_reconfigure: true + init_reconfigure: true environment: - TF_CLI_CONFIG_FILE: "/tmp/.terraformrc" - register: tf_result + # Указываем Terraform искать конфиг именно здесь + TF_CLI_CONFIG_FILE: "{{ playbook_dir }}/../terraform/.terraformrc" - name: Wait for SSH to be ready wait_for: