906d824a19
The current code always overrides tox_environment when running functional tests, but the correct behavior is to add the discovered environment variables to tox_environments, while keeping the user-specified value for it. The current behavior breaks the devstack-tox-functional children jobs, like openstacksdk-functional-devstack-ironic, which set tox_environment. Change-Id: I5dc9054a1495ca0ef7745c08316441ab153956f4
15 lines
535 B
YAML
15 lines
535 B
YAML
- when: openrc_enable_export
|
|
block:
|
|
- name: Extract the OS_ environment variables
|
|
shell:
|
|
cmd: |
|
|
source {{ openrc_file }} {{ openrc_user }} {{ openrc_project }} &>/dev/null
|
|
env | awk -F= 'BEGIN {print "---" } /^OS_/ { print " "$1": \""$2"\""} '
|
|
args:
|
|
executable: "/bin/bash"
|
|
register: env_os
|
|
|
|
- name: Append the the OS_ environment variables to tox_environment
|
|
set_fact:
|
|
tox_environment: "{{ env_os.stdout|from_yaml|default({})|combine(tox_environment) }}"
|