From 1ac68fa21edd7740dcbe09c25be1d90f0b0729d6 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 10 Oct 2025 16:28:20 +0000 Subject: [PATCH] Update file main.yml --- roles/proxmox_lxc/tasks/main.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/proxmox_lxc/tasks/main.yml b/roles/proxmox_lxc/tasks/main.yml index bfcf9c3..3016392 100644 --- a/roles/proxmox_lxc/tasks/main.yml +++ b/roles/proxmox_lxc/tasks/main.yml @@ -5,10 +5,10 @@ delegate_to: proxmox changed_when: false -- name: Create Gateway LXC container using pct command +- name: Create Gateway LXC container using correct template path shell: | pct create 221 \ - /var/lib/vz/template/cache/ubuntu-24.04-standard_24.04-2_amd64.tar.zst \ + "/mnt/pve/vmbackup/template/cache/ubuntu-24.04-standard_24.04-2_amd64.tar.zst" \ --rootfs vmsystem:5 \ --cores 1 \ --memory 2048 \ @@ -16,13 +16,15 @@ --hostname gateway \ --net0 name=eth0,bridge=vmbr0,ip=192.168.1.221/24,gw=192.168.1.1 \ --storage vmsystem \ - --password {{ proxmox_root_password }} \ + --password "{{ proxmox_root_password }}" \ --unprivileged 1 \ --start 1 args: executable: /bin/bash delegate_to: proxmox - when: "'221' not in container_check.stdout" + when: + - "'221' not in container_check.stdout" + - "template_check.rc == 0" - name: Wait for container to start wait_for_connection: