feat(ansible): provision QEMU guest agent on new clones

This commit is contained in:
Hermes Agent committed 2026-11-10 16:06:21 +00:00
1 parent 5148019f9d
commit 53f4d27601
2 files changed
+19 -1

No files matched your search

+18
View File
@@ -94,6 +94,7 @@
ipconfig0: "{{ vm_ipconfig0 }}"
ciuser: "{{ vm_user }}"
sshkeys: "{{ vm_ssh_public_key }}"
agent: "enabled=1,type=virtio"
state: present
no_log: true
@@ -170,6 +171,23 @@
ansible.builtin.command: timedatectl set-timezone "{{ vm_timezone }}"
become: true
- name: Install QEMU guest agent
ansible.builtin.apt:
name: qemu-guest-agent
state: present
become: true
- name: Require QEMU guest agent virtio channel in guest
ansible.builtin.command:
argv: [test, -e, /dev/virtio-ports/org.qemu.guest_agent.0]
changed_when: false
- name: Start QEMU guest agent
ansible.builtin.service:
name: qemu-guest-agent
state: started
become: true
- name: Report verified guest readiness
ansible.builtin.debug:
msg: "VMID {{ provisioned_vmid }} at {{ inventory_hostname }} completed cloud-init."