Spliting tempest validate and install role
Splitting the validate-yaml in two: install_skiplist and validate_yaml. Also renaming the role to use underscore '_' instead of dash '-' becase it will be required in future ansible version. The reason to this split is to reuse these roles when start to use it in other installers, instead of reinvent the wheel. Change-Id: I2a736723087016db3eebf20cea48fadb658ba436
This commit is contained in:
parent
2eac1eeca4
commit
656077a9c9
@ -1,4 +1,7 @@
|
|||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- validate-yaml
|
- install_skiplist
|
||||||
|
- validate_yaml
|
||||||
|
vars:
|
||||||
|
tempest_skip_path: "{{ zuul.projects['opendev.org/openstack/openstack-tempest-skiplist'].src_dir }}"
|
||||||
|
17
roles/install_skiplist/README.rst
Normal file
17
roles/install_skiplist/README.rst
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Install tempest skiplist
|
||||||
|
========================
|
||||||
|
|
||||||
|
This role install tempest-siplist in a virtual environment.
|
||||||
|
|
||||||
|
**Role Variables**
|
||||||
|
|
||||||
|
.. zuul:rolevar:: virtualenvs.tempest_skip
|
||||||
|
:type: string
|
||||||
|
:default: ~/.virtualenvs/.tempest_skip
|
||||||
|
|
||||||
|
A path to virtualenv used to install openstack-tempest-skiplist
|
||||||
|
|
||||||
|
.. zuul:rolevar:: tempest_skip_path
|
||||||
|
:type: string
|
||||||
|
|
||||||
|
A path to the openstack-tempest-skiplist directory
|
5
roles/install_skiplist/defaults/main.yaml
Normal file
5
roles/install_skiplist/defaults/main.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
virtualenvs:
|
||||||
|
tempest_skip: "~/.virtualenvs/.tempest_skip"
|
||||||
|
# Path for the tempest skip
|
||||||
|
# tempest_skip_path:
|
17
roles/install_skiplist/tasks/main.yaml
Normal file
17
roles/install_skiplist/tasks/main.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
- block:
|
||||||
|
- name: Create tempest-skiplist venv with latest pip, setuptools and pbr
|
||||||
|
pip:
|
||||||
|
virtualenv: "{{ virtualenvs.tempest_skip }}"
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: latest
|
||||||
|
with_items:
|
||||||
|
- pip
|
||||||
|
- setuptools
|
||||||
|
- pbr
|
||||||
|
|
||||||
|
- name: Install tempest-skiplist
|
||||||
|
pip:
|
||||||
|
name: "."
|
||||||
|
virtualenv: "{{ virtualenvs.tempest_skip }}"
|
||||||
|
chdir: "{{ tempest_skip_path }}"
|
@ -1,15 +0,0 @@
|
|||||||
Validate yaml schema for tempest skip
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
This role install openstack-tempest-skiplist and execute the validate command
|
|
||||||
to ensure that the yaml file used to store the tempest tests to be skipped are
|
|
||||||
in the correct schema format.
|
|
||||||
|
|
||||||
|
|
||||||
**Role Variables**
|
|
||||||
|
|
||||||
.. zuul:rolevar:: tempest_skip
|
|
||||||
:type: string
|
|
||||||
:default: ~/.virtualenvs/.tempest_skip
|
|
||||||
|
|
||||||
A path to virtualenv used to install openstack-tempest-skiplist
|
|
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
virtualenvs:
|
|
||||||
tempest_skip: "~/.virtualenvs/.tempest_skip"
|
|
13
roles/validate_yaml/README.rst
Normal file
13
roles/validate_yaml/README.rst
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Validate yaml schema for tempest skip
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
This role execute the validate command from tempest-skiplist to ensure that
|
||||||
|
the yaml file used to store the tempest tests to be skipped are
|
||||||
|
in the correct schema format.
|
||||||
|
|
||||||
|
**Role Variables**
|
||||||
|
|
||||||
|
.. zuul:rolevar:: tempest_skip_path
|
||||||
|
:type: string
|
||||||
|
|
||||||
|
A path to the openstack-tempest-skiplist directory
|
3
roles/validate_yaml/defaults/main.yaml
Normal file
3
roles/validate_yaml/defaults/main.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
# Path for the tempest skkip
|
||||||
|
# tempest_skip_path:
|
@ -1,21 +1,5 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: Create tempest-skiplist venv with latest pip, setuptools and pbr
|
|
||||||
pip:
|
|
||||||
virtualenv: "{{ virtualenvs.tempest_skip }}"
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: latest
|
|
||||||
with_items:
|
|
||||||
- pip
|
|
||||||
- setuptools
|
|
||||||
- pbr
|
|
||||||
|
|
||||||
- name: Install tempest-skiplist
|
|
||||||
pip:
|
|
||||||
name: "."
|
|
||||||
virtualenv: "{{ virtualenvs.tempest_skip }}"
|
|
||||||
chdir: "{{ tempest_skip_path }}"
|
|
||||||
|
|
||||||
# TODO(arxcruz) Right now there are yaml files that are not
|
# TODO(arxcruz) Right now there are yaml files that are not
|
||||||
# a valid tempest-skiplist file, so we are using just one for now
|
# a valid tempest-skiplist file, so we are using just one for now
|
||||||
# The task isn't useful until we get rid of the old yaml files
|
# The task isn't useful until we get rid of the old yaml files
|
||||||
@ -36,6 +20,3 @@
|
|||||||
tempest-skip validate --file "{{ tempest_skip_path }}/roles/validate-tempest/vars/tempest_skip.yml"
|
tempest-skip validate --file "{{ tempest_skip_path }}/roles/validate-tempest/vars/tempest_skip.yml"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ tempest_skip_path }}"
|
chdir: "{{ tempest_skip_path }}"
|
||||||
|
|
||||||
vars:
|
|
||||||
tempest_skip_path: "{{ zuul.projects['opendev.org/openstack/openstack-tempest-skiplist'].src_dir }}"
|
|
Loading…
Reference in New Issue
Block a user