Fix for virt-customize call.

This commit is contained in:
2026-06-10 18:25:23 +02:00
parent 03ced3d1b1
commit 4c52425591
@@ -44,10 +44,9 @@
- name: Customize VM image (Inject User/SSH/Sudo)
shell: |
virt-customize -a {{ vm_images_dir }}/{{ vm_name }}.qcow2 \
--username {{ vm_user }} \
--password {{ vm_password }} \
--ssh-insert {{ vm_user }}:keys={{ vm_ssh_public_key | replace('~', lookup('env', 'HOME')) }} \
--run-command "usermod -aG wheel {{ vm_user }}" && \
--run-command "useradd -m -G wheel {{ vm_user }}" \
--password {{ vm_user }}:{{ vm_password }} \
--ssh-inject {{ vm_user }}:keys={{ vm_ssh_public_key | replace('~', lookup('env', 'HOME')) }} && \
touch {{ vm_images_dir }}/{{ vm_name }}.customized
become: yes
args: