Merge "Allow custom elements by appending existing ELEMENTS_PATH var"

This commit is contained in:
Zuul 2020-08-27 16:23:22 +00:00 committed by Gerrit Code Review
commit 5a1197ab4a
2 changed files with 15 additions and 1 deletions

View File

@ -132,9 +132,16 @@
set_fact:
dib_env_vars_final: "{{dib_env_vars_final | combine({'DIB_RELEASE':dib_os_release}) }}"
when: dib_os_release is defined
- name: "Build ELEMENTS_PATH variable from IPA builder element folder"
set_fact:
dib_elements_path: "{{ [ ipa_builder_git_folder + '/dib' ] }}"
- name: "Add existing ELEMENTS_PATH value if present"
set_fact:
dib_elements_path: "{{ dib_elements_path + [dib_env_vars_final['ELEMENTS_PATH']] }}"
when: "'ELEMENTS_PATH' in dib_env_vars_final"
- name: "Set the ELEMENTS_PATH environment variable"
set_fact:
dib_env_vars_final: "{{dib_env_vars_final | combine({'ELEMENTS_PATH': ipa_builder_git_folder + '/dib'}) }}"
dib_env_vars_final: "{{ dib_env_vars_final | combine({'ELEMENTS_PATH': dib_elements_path | join(':') }) }}"
- name: "Set the DIB_BLOCK_DEVICE_CONFIG variable if set"
set_fact:
dib_env_vars_final: "{{ dib_env_vars_final | combine({'DIB_BLOCK_DEVICE_CONFIG': dib_partitioning}) }}"

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixes an issue where the bifrost-create-dib-image role
overrides any existing ELEMENTS_PATH environment variable
value. This fix appends any existing ELEMENTS_PATH
value to the path set in the role.