diff --git a/playbooks/tox/run-both.yaml b/playbooks/tox/run-both.yaml index 0528b46f00..e4043d8231 100644 --- a/playbooks/tox/run-both.yaml +++ b/playbooks/tox/run-both.yaml @@ -8,5 +8,4 @@ - test-setup - ensure-tox - get-devstack-os-environment - - role: tox - tox_environment: "{{ os_env_vars|default({}) }}" + - tox diff --git a/playbooks/tox/run.yaml b/playbooks/tox/run.yaml index 6e549d3655..0d065c6ca2 100644 --- a/playbooks/tox/run.yaml +++ b/playbooks/tox/run.yaml @@ -1,5 +1,4 @@ - hosts: all roles: - get-devstack-os-environment - - role: tox - tox_environment: "{{ os_env_vars|default({}) }}" + - tox diff --git a/roles/get-devstack-os-environment/defaults/main.yaml b/roles/get-devstack-os-environment/defaults/main.yaml index 73ecfe920c..f68ea560d0 100644 --- a/roles/get-devstack-os-environment/defaults/main.yaml +++ b/roles/get-devstack-os-environment/defaults/main.yaml @@ -3,3 +3,4 @@ openrc_file: "{{ devstack_base_dir }}/devstack/openrc" openrc_user: admin openrc_project: admin openrc_enable_export: false +tox_environment: {} diff --git a/roles/get-devstack-os-environment/tasks/main.yaml b/roles/get-devstack-os-environment/tasks/main.yaml index 8c8df7f96d..b2c5e93ed4 100644 --- a/roles/get-devstack-os-environment/tasks/main.yaml +++ b/roles/get-devstack-os-environment/tasks/main.yaml @@ -9,6 +9,6 @@ executable: "/bin/bash" register: env_os - - name: Save the OS_ environment variables as a fact + - name: Append the the OS_ environment variables to tox_environment set_fact: - os_env_vars: "{{ env_os.stdout|from_yaml }}" + tox_environment: "{{ env_os.stdout|from_yaml|default({})|combine(tox_environment) }}"