Update file main.yml

This commit is contained in:
Administrator 2025-10-10 16:28:20 +00:00
parent 52e0067404
commit 1ac68fa21e

View File

@ -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: