Обновить ansible/deploy_all.yml

This commit is contained in:
2025-12-28 08:24:18 +00:00
parent 73424d196c
commit 454e914566

View File

@@ -2,7 +2,7 @@
- name: Step 1 - Terraform Provisioning - name: Step 1 - Terraform Provisioning
hosts: localhost hosts: localhost
connection: local connection: local
gather_facts: true # Это важно, чтобы получить путь к HOME gather_facts: true
tasks: tasks:
- name: Create terraform mirror config in HOME - name: Create terraform mirror config in HOME
copy: copy:
@@ -18,13 +18,16 @@
} }
} }
- name: Cleanup old terraform data
file:
path: "{{ playbook_dir }}/../terraform/.terraform"
state: absent
- name: Run Terraform Apply - name: Run Terraform Apply
community.general.terraform: community.general.terraform:
project_path: "{{ playbook_dir }}/../terraform" project_path: "{{ playbook_dir }}/../terraform"
state: present state: present
force_init: true force_init: true
init_reconfigure: true # Это уберет ошибку "Backend initialization required"
# Environment больше не нужен, Terraform сам найдет ~/.terraformrc
- name: Wait for SSH to be ready - name: Wait for SSH to be ready
wait_for: wait_for: