From 454e914566f1bb6ea3c2b07ef98f7ac45f61b9f1 Mon Sep 17 00:00:00 2001 From: ogrechko Date: Sun, 28 Dec 2025 08:24:18 +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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ansible/deploy_all.yml b/ansible/deploy_all.yml index b829d84..2176f13 100644 --- a/ansible/deploy_all.yml +++ b/ansible/deploy_all.yml @@ -2,7 +2,7 @@ - name: Step 1 - Terraform Provisioning hosts: localhost connection: local - gather_facts: true # Это важно, чтобы получить путь к HOME + gather_facts: true tasks: - name: Create terraform mirror config in HOME copy: @@ -18,13 +18,16 @@ } } + - name: Cleanup old terraform data + file: + path: "{{ playbook_dir }}/../terraform/.terraform" + state: absent + - name: Run Terraform Apply community.general.terraform: project_path: "{{ playbook_dir }}/../terraform" state: present force_init: true - init_reconfigure: true # Это уберет ошибку "Backend initialization required" - # Environment больше не нужен, Terraform сам найдет ~/.terraformrc - name: Wait for SSH to be ready wait_for: