From b99e590a1796a95445d9a4dff8734b9aef076af6 Mon Sep 17 00:00:00 2001 From: hogweed1 Date: Wed, 4 Nov 2026 22:12:25 +1000 Subject: [PATCH] well, --- playbooks/_helpers/create_vm_or_lxc.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/playbooks/_helpers/create_vm_or_lxc.yml b/playbooks/_helpers/create_vm_or_lxc.yml index 46acecf..ade8f98 100644 --- a/playbooks/_helpers/create_vm_or_lxc.yml +++ b/playbooks/_helpers/create_vm_or_lxc.yml @@ -121,6 +121,21 @@ environment: PYTHONHTTPSVERIFY: "0" # <--- И здесь тоже + + # 4. ЗАПУСК КОНТЕЙНЕРА (Переводим в state: started) + - name: Ensure LXC container is started + community.general.proxmox: + api_host: "{{ ansible_host }}" + api_port: "8006" + api_user: "{{ pve_user }}" + api_password: "{{ pve_password }}" + api_token_id: "{{ pve_token_id }}" + api_token_secret: "{{ pve_token_secret }}" + alidate_certs: false + node: "{{ target_node }}" + vmid: "{{ allocated_id }}" + state: started # <--- Магия запуска + # === Выводим ID в конце, чтобы знать, что создалось === - name: Show allocated ID ansible.builtin.debug: