Fix image creation when dib_os_release not defined
If using Bifrost to build images via diskimage-builder, the dib_os_release variable can be used to specify the DIB_RELEASE environment variable. However, if the dib_os_release variable is unset, image creation will fail. This change sets the dib_env_vars_final variable unconditionally to ensure that it is always defined when accessed. Change-Id: If32b2ebc13fe521e986ed6593fd3a8b99ec90567 Closes-Bug: #1665671
This commit is contained in:
parent
419db33b83
commit
a27638161f
@ -108,9 +108,12 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
dib_os_release: "jessie"
|
dib_os_release: "jessie"
|
||||||
when: dib_os_element == "debian" and dib_os_release is undefined
|
when: dib_os_element == "debian" and dib_os_release is undefined
|
||||||
|
- name: "Initialize the DIB environment variables fact"
|
||||||
|
set_fact:
|
||||||
|
dib_env_vars_final: "{{dib_env_vars}}"
|
||||||
- name: "Set the DIB_RELEASE environment variable if set"
|
- name: "Set the DIB_RELEASE environment variable if set"
|
||||||
set_fact:
|
set_fact:
|
||||||
dib_env_vars_final: "{{dib_env_vars | combine({'DIB_RELEASE':dib_os_release}) }}"
|
dib_env_vars_final: "{{dib_env_vars_final | combine({'DIB_RELEASE':dib_os_release}) }}"
|
||||||
when: dib_os_release is defined
|
when: dib_os_release is defined
|
||||||
- name: "Build argument list"
|
- name: "Build argument list"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
Loading…
Reference in New Issue
Block a user