James E. Blair c5c2eae9c1
Add build_diskimage_environment role variable
This adds a role variable to configure the diskimage-builder environment.
This allows users a choice of using the Ansible "environment" argument,
or using a variable.  The variable may be particularly useful since it
allows full configuration of the role from a Zuul job definition.

Change-Id: I68542f13454b4f2e2e9bb8d356feefddba23d8f2
2024-08-23 13:37:37 +02:00

18 lines
504 B
YAML

- hosts: all
roles:
- ensure-dib
- role: build-diskimage
build_diskimage_image_name: foo-ubuntu-image
build_diskimage_formats: ["qcow2"]
build_diskimage_elements: ["vm", "ubuntu"]
build_diskimage_environment:
DIB_RELEASE: "noble"
tasks:
- name: Gather image file info
stat:
path: "/home/zuul/dib-images/foo-ubuntu-image.qcow2"
register: image_file
- name: Assert image file exists
assert:
that: image_file.stat.exists