
Adds support for installing python-tempestconf from the given source. This will be especially handy in CI jobs (f.e. in Zuul) when python-tempestconf's new changes are needed to be verified against refstack-client and this role (as python-tempestconf is a dependency of refstack-client we don't want to accidentally break refstack-client by a new changes in the tempestconf) Change-Id: I4541050f550d377956db51acf2b29f3f691cd5b9
40 lines
1013 B
YAML
40 lines
1013 B
YAML
---
|
|
- name: Check if refstack_client_source dir exists and if it's empty
|
|
find:
|
|
paths: "{{ refstack_client_source }}"
|
|
register: local_refstack_found
|
|
|
|
- debug:
|
|
var: refstack_client_source
|
|
|
|
- name: Clone refstack-client
|
|
git:
|
|
repo: 'https://github.com/openstack/refstack-client.git'
|
|
dest: "{{ refstack_client_source }}"
|
|
version: "{{ refstack_client_version }}"
|
|
when: local_refstack_found.matched == 0
|
|
|
|
- name: Look for python3
|
|
command: "python3 --version"
|
|
ignore_errors: true
|
|
register: python3_is_available
|
|
changed_when: false
|
|
|
|
- name: Set python3 params for setup_env
|
|
set_fact:
|
|
python3_param: "-p 3"
|
|
when: python3_is_available.rc == 0
|
|
|
|
- name: Install refstack-client
|
|
shell: >
|
|
./setup_env {{ python3_param | default('') }}
|
|
{% if tempest_tag is defined %}
|
|
-t {{ tempest_tag }}
|
|
{% endif %}
|
|
{% if tempestconf_source is defined %}
|
|
-s {{ tempestconf_source }}
|
|
{% endif %}
|
|
args:
|
|
chdir: "{{ refstack_client_source }}"
|
|
changed_when: true
|