From 77723f8ef7d07aa2c4cf7a79015165564da13678 Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 27 Jul 2026 19:06:22 -0400 Subject: [PATCH] fix(proxmox_lxc_provision): wait for container config file before editing it The proxmox create task can return before pmxcfs has flushed the .conf, so the first delegated lineinfile hit 'Destination /etc/pve/lxc/.conf does not exist'. Poll for the file with wait_for (up to 30s) before applying idmaps/GPU config, which continues as soon as it appears rather than eating a fixed sleep. --- roles/proxmox_lxc_provision/tasks/edit-config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/proxmox_lxc_provision/tasks/edit-config.yml b/roles/proxmox_lxc_provision/tasks/edit-config.yml index cd843a6..f1ba6a7 100755 --- a/roles/proxmox_lxc_provision/tasks/edit-config.yml +++ b/roles/proxmox_lxc_provision/tasks/edit-config.yml @@ -6,6 +6,13 @@ # preserves in place. Each line is keyed on its own exact content, so no comment # markers are needed and re-runs stay churn-free. +- name: Wait for the container config file to exist + ansible.builtin.wait_for: + path: "/etc/pve/lxc/{{ lxc_vmid }}.conf" + timeout: 30 + delegate_to: "{{ proxmox_delegate_host }}" + become: true + - name: Configure ID mappings ansible.builtin.lineinfile: path: "/etc/pve/lxc/{{ lxc_vmid }}.conf"