Update file main.yml
This commit is contained in:
parent
52e0067404
commit
1ac68fa21e
@ -5,10 +5,10 @@
|
|||||||
delegate_to: proxmox
|
delegate_to: proxmox
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Create Gateway LXC container using pct command
|
- name: Create Gateway LXC container using correct template path
|
||||||
shell: |
|
shell: |
|
||||||
pct create 221 \
|
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 \
|
--rootfs vmsystem:5 \
|
||||||
--cores 1 \
|
--cores 1 \
|
||||||
--memory 2048 \
|
--memory 2048 \
|
||||||
@ -16,13 +16,15 @@
|
|||||||
--hostname gateway \
|
--hostname gateway \
|
||||||
--net0 name=eth0,bridge=vmbr0,ip=192.168.1.221/24,gw=192.168.1.1 \
|
--net0 name=eth0,bridge=vmbr0,ip=192.168.1.221/24,gw=192.168.1.1 \
|
||||||
--storage vmsystem \
|
--storage vmsystem \
|
||||||
--password {{ proxmox_root_password }} \
|
--password "{{ proxmox_root_password }}" \
|
||||||
--unprivileged 1 \
|
--unprivileged 1 \
|
||||||
--start 1
|
--start 1
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
delegate_to: proxmox
|
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
|
- name: Wait for container to start
|
||||||
wait_for_connection:
|
wait_for_connection:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user