From 06c21ed7b3793da32282af4b928cd0edf24b6e7d Mon Sep 17 00:00:00 2001 From: ogrechko Date: Sun, 28 Dec 2025 08:41:42 +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 | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ansible/deploy_all.yml b/ansible/deploy_all.yml index 1192966..35ac0af 100644 --- a/ansible/deploy_all.yml +++ b/ansible/deploy_all.yml @@ -3,6 +3,7 @@ hosts: localhost connection: local gather_facts: true + become: false # <--- ЭТО ВАЖНО: отключаем sudo для локальных задач vars: tf_dir: "{{ playbook_dir }}/../terraform" tasks: @@ -30,7 +31,6 @@ chdir: "{{ tf_dir }}" environment: TF_CLI_CONFIG_FILE: "{{ ansible_user_dir }}/.terraformrc" - # Эти переменные Semaphore должен передать в Ansible TF_HTTP_USERNAME: "{{ lookup('env', 'TF_HTTP_USERNAME') }}" TF_HTTP_PASSWORD: "{{ lookup('env', 'TF_HTTP_PASSWORD') }}" @@ -40,21 +40,13 @@ chdir: "{{ tf_dir }}" environment: TF_CLI_CONFIG_FILE: "{{ ansible_user_dir }}/.terraformrc" - # Передаем токены Proxmox в Terraform TF_VAR_proxmox_api_token_id: "{{ lookup('env', 'TF_VAR_proxmox_api_token_id') }}" TF_VAR_proxmox_api_token_secret: "{{ lookup('env', 'TF_VAR_proxmox_api_token_secret') }}" - - - name: Wait for SSH to be ready - wait_for: - host: "{{ item.value.ip }}" - port: 22 - state: started - timeout: 300 - loop: "{{ lookup('dict', vm_nodes | default({})) }}" # Используем переменные из TF если нужно + TF_VAR_proxmox_api_url: "{{ lookup('env', 'TF_VAR_proxmox_api_url') }}" - name: Step 2 - Install Kubernetes hosts: all - become: true + become: true # Для реальных серверов sudo всё еще нужно tasks: - name: Install base packages apt: