
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
20 lines
755 B
YAML
20 lines
755 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 | 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 }}"
|