From cfb03672b0e430b365c824b3ed53ee68f71b78c8 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Wed, 14 Jul 2021 08:40:15 +0000 Subject: [PATCH] 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 --- tasks/install-refstack-client.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/install-refstack-client.yaml b/tasks/install-refstack-client.yaml index d578989..13520be 100644 --- a/tasks/install-refstack-client.yaml +++ b/tasks/install-refstack-client.yaml @@ -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