zuul-jobs/roles/build-diskimage/tasks/main.yaml
James E. Blair 4e1e155638 Allow dib_elements key to be a nested list
It's highly likely that folks may want to use YAML anchors to
build up list of DIB elements.  To aid in that, allow the value
to be a list of lists and automatically flatton it.

Change-Id: I55b9cb16951b51da32f99ca5858b75217951b279
2024-09-12 07:54:38 -07:00

20 lines
765 B
YAML

- name: Ensure DIB image root
file:
path: "{{ build_diskimage_image_root }}"
state: directory
- name: Build diskimage
command: >
"{{ build_diskimage_command }}"
-o "{{ build_diskimage_image_root }}/{{ build_diskimage_image_name | mandatory }}"
-t "{{ build_diskimage_formats | join(',') }}"
--logfile "{{ build_diskimage_logs_dir }}/diskimage-{{ build_diskimage_image_name }}.log"
{{ build_diskimage_elements | mandatory | flatten | join(' ') }}
args:
chdir: "{{ build_diskimage_image_root }}"
environment: "{{ build_diskimage_environment }}"
register: build_diskimage_result
until: build_diskimage_result is not failed
retries: "{{ build_diskimage_retry_limit }}"
delay: "{{ build_diskimage_retry_delay }}"