diff --git a/ansible/deploy_all.yml b/ansible/deploy_all.yml index 7c71853..e3e8b4e 100644 --- a/ansible/deploy_all.yml +++ b/ansible/deploy_all.yml @@ -2,11 +2,11 @@ - name: Step 1 - Terraform Provisioning hosts: localhost connection: local - gather_facts: false + gather_facts: true # Включаем сбор фактов, чтобы знать домашнюю директорию tasks: - - name: Create terraform mirror config locally + - name: Create terraform mirror config in /tmp copy: - dest: "{{ playbook_dir }}/../terraform/.terraformrc" # Кладем прямо в папку с кодом + dest: "/tmp/.terraformrc" content: | provider_installation { network_mirror { @@ -24,8 +24,8 @@ force_init: true init_reconfigure: true environment: - # Указываем Terraform искать конфиг именно здесь - TF_CLI_CONFIG_FILE: "{{ playbook_dir }}/../terraform/.terraformrc" + # Используем жесткий абсолютный путь + TF_CLI_CONFIG_FILE: "/tmp/.terraformrc" - name: Wait for SSH to be ready wait_for: