tasks: tempest_install: Add conditional for PIP package installation

SUSE and CentOS use an empty list for the required PIP packages and this
breaks the role as follows:

fatal: [aio1_utility_container-efed904e]: FAILED! => {"attempts": 5, "changed": false, "cmd": "/usr/bin/pip2 install -U  ", "msg":
"\n:stderr: ERROR: You must give at least one requirement to install (see \"pip help install\")\n"}

As such, we need to check if the list is empty before we try to install
the PIP packages.

Change-Id: I67d54fafdbecc7d55de55cd30163105b6a997dac
Implements: blueprint openstack-distribution-packages
This commit is contained in:
Markos Chandras
2018-07-05 18:25:21 +01:00
parent cc6dd8e84b
commit c3d1f91fbe

View File

@@ -40,6 +40,7 @@
extra_args: >-
{{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
{{ pip_install_options | default('') }}
when: tempest_requires_pip_packages | length > 0
register: install_packages
until: install_packages|success
retries: 5