diff --git a/roles/build-diskimage/README.rst b/roles/build-diskimage/README.rst index 7d292b365..1e9a1b3d7 100644 --- a/roles/build-diskimage/README.rst +++ b/roles/build-diskimage/README.rst @@ -23,7 +23,7 @@ Example: .. zuul:rolevar:: build_diskimage_command :default: "{{ ensure_dib_command }}" - Path to the build-disk-image command. This defaults to + Path to the build-disk-image command. This defaults to {{ ensure_dib_command }}. as being set by the ensure-dib role. .. zuul:rolevar:: build_diskimage_image_name @@ -42,6 +42,9 @@ Example: List of elements that should be used when creating the disk image. + For ease of use with YAML anchors, this may be provided as a list + of lists which will be flattened automatically. + .. zuul:rolevar:: build_diskimage_environment :type: dict diff --git a/roles/build-diskimage/tasks/main.yaml b/roles/build-diskimage/tasks/main.yaml index 5e4781255..4be0141c9 100644 --- a/roles/build-diskimage/tasks/main.yaml +++ b/roles/build-diskimage/tasks/main.yaml @@ -9,7 +9,7 @@ -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 | join(' ') }} + {{ build_diskimage_elements | mandatory | flatten | join(' ') }} args: chdir: "{{ build_diskimage_image_root }}" environment: "{{ build_diskimage_environment }}" diff --git a/zuul.d/dib-jobs.yaml b/zuul.d/dib-jobs.yaml index 7f04fe37b..6e6ed9a49 100644 --- a/zuul.d/dib-jobs.yaml +++ b/zuul.d/dib-jobs.yaml @@ -26,6 +26,9 @@ List of elements that should be used when creating the disk image. + For ease of use with YAML anchors, this may be provided as a list + of lists which will be flattened automatically. + .. zuul:jobvar:: build_diskimage_environment :type: dict