Set ensure_pip_virtualenv_command in Focal proposal jobs

Previously we had this error:

  No key/value pairs provided, at least one is required for this action to succeed

Which appears to be due to the default(omit) condition when setting
ensure_pip_virtualenv_command in focal proposal jobs. The issue is
default(omit) doesn't do what you think it does when defining a
variable. It is really only useful for defining module parameters that
may be omitted.

Instead we need to call ensure-tox two different ways depending on
whether or not we want to override the defaults for
ensure_pip_virtualenv_command. One method for Bionic and another for
Focal keyed off of whether or not _venv_command is defined.

Change-Id: I0cbca64f4a31c8b4eacb5e1c50f2e9fb289ce18e
This commit is contained in:
Clark Boylan 2022-07-27 09:08:04 -07:00
parent 4616695be0
commit 55215ac11c

View File

@ -76,9 +76,17 @@
vars: vars:
python_version: 3.9 python_version: 3.9
- name: Install tox - name: Install tox with venv command override
include_role: include_role:
name: ensure-tox name: ensure-tox
vars: vars:
ensure_global_symlinks: true ensure_global_symlinks: true
ensure_pip_virtualenv_command: '{{ _venv_command | default(omit) }}' ensure_pip_virtualenv_command: '{{ _venv_command }}'
when: _venv_command is defined
- name: Install tox without venv command override
include_role:
name: ensure-tox
vars:
ensure_global_symlinks: true
when: _venv_command is not defined