Enable os_tempest in quickstart-extras-validate playbook
This is needed so os-tempest can also be used in addition to validate-tempest role to run tempest when quickstart-extras-validate playbook is used. Also let's ensure virtualenv package is installed when using os-tempest it can be absent when. Change-Id: I44ab4eff686100966012118ccd9ac016d6c2ee54
This commit is contained in:
parent
d028ffd370
commit
ff35d9ba07
@ -17,7 +17,7 @@
|
||||
roles:
|
||||
- {role: validate-simple, when: test_ping|bool}
|
||||
|
||||
# Execute tempest against the overcloud deployment
|
||||
# Execute tempest using validate-tempest against the overcloud deployment
|
||||
- name: Execute tempest against the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
@ -26,6 +26,21 @@
|
||||
roles:
|
||||
- {role: validate-tempest, when: tempest_config|bool or run_tempest|bool}
|
||||
|
||||
# Execute tempest using os_tempest against the overcloud deployment
|
||||
- name: Validate the deployment
|
||||
hosts: undercloud
|
||||
tasks:
|
||||
- include_tasks: tempest.yml
|
||||
vars:
|
||||
tempest_install_method: distro
|
||||
tempest_cloud_name: 'overcloud'
|
||||
when:
|
||||
- not run_tempest|bool
|
||||
- use_os_tempest is defined
|
||||
- use_os_tempest|bool
|
||||
tags:
|
||||
- overcloud-validate
|
||||
|
||||
# Ensure services and containers are OK
|
||||
- name: Execute simple service and container validations
|
||||
hosts:
|
||||
|
@ -91,6 +91,30 @@
|
||||
tempest_test_blacklist: "{{ known_failures | json_query('[?undercloud != `true`]') }}"
|
||||
when: tempest_cloud_name != 'undercloud'
|
||||
|
||||
- name: set python_cmd
|
||||
set_fact:
|
||||
python_cmd: "python{{ ansible_python.version.major }}"
|
||||
cacheable: true
|
||||
when: python_cmd is not defined
|
||||
|
||||
- name: Check if virtualenv is in the system
|
||||
command: "{{ python_cmd }} -m virtualenv --version"
|
||||
register: virtualenv_exist
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- when: virtualenv_exist.rc != 0
|
||||
name: Install virtualenv
|
||||
become: true
|
||||
package:
|
||||
state: present
|
||||
name: >
|
||||
{% if ansible_python.version.major == 3 %}
|
||||
python3-virtualenv
|
||||
{% else %}
|
||||
python-virtualenv
|
||||
{% endif %}
|
||||
|
||||
- name: Run os_tempest role
|
||||
vars:
|
||||
ansible_become: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user