From 120ace41f2baccb41f8349bfacf19e5960c58c62 Mon Sep 17 00:00:00 2001 From: ogrechko Date: Sun, 28 Dec 2025 08:20:46 +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 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ansible/deploy_all.yml b/ansible/deploy_all.yml index e3e8b4e..b829d84 100644 --- a/ansible/deploy_all.yml +++ b/ansible/deploy_all.yml @@ -2,11 +2,12 @@ - name: Step 1 - Terraform Provisioning hosts: localhost connection: local - gather_facts: true # Включаем сбор фактов, чтобы знать домашнюю директорию + gather_facts: true # Это важно, чтобы получить путь к HOME tasks: - - name: Create terraform mirror config in /tmp + - name: Create terraform mirror config in HOME copy: - dest: "/tmp/.terraformrc" + dest: "{{ ansible_user_dir }}/.terraformrc" + mode: '0644' content: | provider_installation { network_mirror { @@ -22,10 +23,8 @@ project_path: "{{ playbook_dir }}/../terraform" state: present force_init: true - init_reconfigure: true - environment: - # Используем жесткий абсолютный путь - TF_CLI_CONFIG_FILE: "/tmp/.terraformrc" + init_reconfigure: true # Это уберет ошибку "Backend initialization required" + # Environment больше не нужен, Terraform сам найдет ~/.terraformrc - name: Wait for SSH to be ready wait_for: