Fix bifrost_venv_dir default assignment
The lookup('env', ...) will assign a value to the vatiable even if the env value is undefined, bypassing the default statement in ansible. We should use 'or' to fix that. Change-Id: I113f5180a17b2cec1e26879003b13c415bbd5c0b
This commit is contained in:
parent
810b5b3001
commit
00ac26e1e4
@ -21,7 +21,7 @@ reqs_git_folder: /opt/stack/requirements
|
||||
ipa_builder_git_folder: /opt/stack/ironic-python-agent-builder
|
||||
# Settings related to installing bifrost in a virtual environment
|
||||
enable_venv: true
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') | default('/opt/stack/bifrost') }}"
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||
bifrost_venv_env:
|
||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||
|
@ -36,7 +36,7 @@ test_vm_machine: "pc-1.0"
|
||||
test_vm_libvirt_uri: "{{ lookup('env', 'LIBVIRT_CONNECT_URI') | default('qemu:///system', true) }}"
|
||||
# Settings related to installing bifrost in a virtual environment
|
||||
enable_venv: true
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') | default('/opt/stack/bifrost') }}"
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||
bifrost_venv_env:
|
||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||
|
@ -241,7 +241,7 @@ download_ipxe: false
|
||||
|
||||
# Settings related to installing bifrost in a virtual environment
|
||||
enable_venv: true
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') | default('/opt/stack/bifrost') }}"
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||
bifrost_venv_env:
|
||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||
|
@ -36,7 +36,7 @@ http_boot_folder: /httpboot
|
||||
|
||||
# Settings related to installing bifrost in a virtual environment
|
||||
enable_venv: true
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') | default('/opt/stack/bifrost') }}"
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||
bifrost_venv_env:
|
||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
# Global options
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') | default('/opt/stack/bifrost') }}"
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||
bifrost_venv_env:
|
||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||
|
Loading…
Reference in New Issue
Block a user