049863e304
It modifies multinode-validate playbook to use os_tempest for running tempest and also pass required vars for the same. Since os_tempest runs as a root user so we need clouds.yaml in /root/.config/openstack/dir. For that two tasks were add for the same. Change-Id: I1f07fc996990273bfb8ef41cdcf7cb9a183a6d3c Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
72 lines
2.5 KiB
YAML
72 lines
2.5 KiB
YAML
---
|
|
- name: Fail the tempest playbook on undefined cloud name and install method
|
|
fail:
|
|
msg: |
|
|
The variable tempest_install_method and tempest_cloud_name is required and
|
|
has not been set.
|
|
when:
|
|
- tempest_install_method is not defined
|
|
- tempest_cloud_name is not defined
|
|
|
|
- name: Initialize neutron service for network creation
|
|
set_fact:
|
|
tempest_service_available_neutron: true
|
|
|
|
- name: Create /root/.config/openstack directory
|
|
file:
|
|
state: directory
|
|
path: "/root/.config/openstack"
|
|
mode: 0700
|
|
become: true
|
|
|
|
- name: Copy clouds.yaml file from user's home to /root directory
|
|
copy:
|
|
src: '{{ ansible_user_dir }}/.config/openstack/clouds.yaml'
|
|
dest: '/root/.config/openstack/clouds.yaml'
|
|
mode: 0600
|
|
become: true
|
|
|
|
- name: Set network vars
|
|
set_fact:
|
|
tempest_public_net_physical_type: 'datacentre'
|
|
tempest_private_net_provider_type: 'geneve'
|
|
tempest_public_subnet_cidr: '{{ tempest_cidr }}'
|
|
tempest_public_subnet_gateway_ip: '{{ tempest_cidr|nthhost(1) }}'
|
|
tempest_public_subnet_allocation_pools: '{{ tempest_cidr|nthhost(100) ~ "-" ~ tempest_cidr|nthhost(120) }}'
|
|
when: tempest_cidr is defined
|
|
|
|
- name: Set tempest workspace related vars
|
|
set_fact:
|
|
tempest_use_tempestconf: true
|
|
tempest_service_setup_host: '{{ inventory_hostname }}'
|
|
tempest_workspace: "{{ ansible_user_dir }}/tempest"
|
|
stackviz_venv_bin: "{{ ansible_user_dir }}/stackviz_venv/bin"
|
|
|
|
- name: set facts while running tempest from source
|
|
set_fact:
|
|
tempest_git_repo: https://opendev.org/openstack/tempest
|
|
tempest_tempestconf_git_repo: https://opendev.org/openstack/python-tempestconf
|
|
tempest_tempestconf_venv_bin: "{{ ansible_user_dir }}/tempestconf_venv/bin"
|
|
tempest_venv_bin: "{{ ansible_user_dir }}/tempest_venv/bin"
|
|
when: tempest_install_method == 'source'
|
|
|
|
- name: Load tempest skiplist file
|
|
include_vars: "{{ playbook_dir | dirname }}/vars/tempest_skip_{{ release | default('master') }}.yml"
|
|
|
|
# TODO(arxcruz): For now this is the easiest way to fix this:
|
|
# os_tempest uses the variable tempest_test_blacklist while we use
|
|
# known_failures. Change now, means a lot of changes on other parts of the code
|
|
# (tempestmail, validate-tempest, etc). Once we migrate to os_tempest we can
|
|
# switch that.
|
|
- name: Set tempest_test_blacklist
|
|
set_fact:
|
|
tempest_test_blacklist: "{{ known_failures | default([])}}"
|
|
|
|
- name: Run os_tempest role
|
|
vars:
|
|
ansible_become: true
|
|
debug: true
|
|
tempest_run: 'yes'
|
|
include_role:
|
|
name: os_tempest
|