About

June 20, 2026 ยท View on GitHub

This shows how to provision a VM image using Ansible from a Packer template.

Usage (Ubuntu 24.04)

Install packer, qemu/kvm, docker, make, vagrant and the Debian 13 UEFI vagrant box.

Lint the playbook.yml playbook playbook:

./ansible-lint.sh --offline --parseable playbook.yml || echo 'ERROR linting'

Provision the VM image and vagrant box:

make

Try using the VM image in a new VM:

vagrant box add -f packer-qemu-ansible-debian-example packer-qemu-ansible-debian-example.box
for vol in $(virsh vol-list --pool default | awk '/packer-qemu-ansible-debian-example_/ {print \$1}'); do
    virsh vol-delete --pool default "$vol"
done
pushd example
vagrant up --no-destroy-on-error --no-tty --provider=libvirt
vagrant ssh
exit
vagrant destroy -f
popd
vagrant box remove -f packer-qemu-ansible-debian-example
for vol in $(virsh vol-list --pool default | awk '/packer-qemu-ansible-debian-example_/ {print \$1}'); do
    virsh vol-delete --pool default "$vol"
done

List this repository dependencies (and which have newer versions):

GITHUB_COM_TOKEN='YOUR_GITHUB_PERSONAL_TOKEN' ./renovate.sh