Clone older tempestconf if py3 is not available

If py3 is not available, let's clone latest python-tempestconf
which supports py2 - 2.5.0 version. Otherwise the role won't be
able to generate tempest.conf required for refstack-client as
python-tempestconf will fail because the by default cloned version
is py3 only.

Change-Id: I25a0dc99fb7cba3163b90f1678ae2dcb65e66a7f
This commit is contained in:
Martin Kopec 2021-07-14 08:40:15 +00:00
parent 2e28d75956
commit cfb03672b0
1 changed files with 12 additions and 0 deletions

View File

@ -25,6 +25,15 @@
python3_param: "-p 3"
when: python3_is_available.rc == 0
- name: Clone py2 python-tempestconf
git:
repo: 'https://git.openstack.org/osf/python-tempestconf.git'
dest: "{{ refstack_client_source }}/.tempestconf_source"
version: "2.5.0"
when:
- python3_is_available.rc != 0
- tempestconf_source is not defined
- when: refstack_tempest_plugins is defined
block:
# refstack-client allows installation of additional packages to find more
@ -55,6 +64,9 @@
{% if tempestconf_source is defined %}
-s {{ tempestconf_source }}
{% endif %}
{% if tempestconf_source is not defined and python3_is_available.rc != 0 %}
-s {{ refstack_client_source }}/.tempestconf_source
{% endif %}
args:
chdir: "{{ refstack_client_source }}"
changed_when: true