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: