fix cloud init template

This commit is contained in:
counterweight 2025-11-02 01:24:39 +01:00
parent 4d8e641466
commit d4782d00cc
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 2 additions and 5 deletions

View file

@ -58,11 +58,7 @@
force: false force: false
when: not debian_image_stat.stat.exists when: not debian_image_stat.stat.exists
- name: Ensure ZFS storage allows snippets content - name: Ensure local storage allows snippets content (used for cloud-init snippets)
command: >
pvesm set {{ proxmox_image_storage }} --content images,rootdir,snippets
- name: Ensure local storage allows snippets content
command: > command: >
pvesm set local --content images,iso,vztmpl,snippets pvesm set local --content images,iso,vztmpl,snippets
failed_when: false failed_when: false

View file

@ -42,6 +42,7 @@ resource "proxmox_vm_qemu" "vm" {
} }
# Cloud-init: user, ssh keys, IP, and custom snippet for qemu-guest-agent # Cloud-init: user, ssh keys, IP, and custom snippet for qemu-guest-agent
# Note: Using 'local' storage for snippets (not ZFS) as ZFS storage doesn't properly support snippet paths
ciuser = var.cloud_init_user ciuser = var.cloud_init_user
sshkeys = var.ssh_authorized_keys sshkeys = var.ssh_authorized_keys
ipconfig0 = try(each.value.ipconfig0, local.default_ipconfig0) ipconfig0 = try(each.value.ipconfig0, local.default_ipconfig0)