diff --git a/tasks/main.yml b/tasks/main.yml index da5216b2..ec3e0278 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,8 +31,18 @@ with_items: "{{ tempest_services }}" when: tempest_services | length > 0 -- name: Gather variables for installation method - include_vars: "{{ tempest_install_method }}_install.yml" + # NOTE(jrosser) we use source installs for temepest and it's plugins on ubuntu distro installs +- name: Gather variables for source installs + include_vars: source_install.yml + when: + - ((tempest_install_method == 'source') or (tempest_install_method == 'distro' and ansible_distribution == 'Ubuntu')) + tags: + - always + +- name: Gather variables for distro installs + include_vars: distro_install.yml + when: + - tempest_install_method == 'distro' tags: - always diff --git a/tasks/tempest_install.yml b/tasks/tempest_install.yml index 5500e1e7..d3ce7f34 100644 --- a/tasks/tempest_install.yml +++ b/tasks/tempest_install.yml @@ -31,7 +31,7 @@ # in defaults as in case of non-integrated tests meta handlers from other roles might fail. - name: Install Tempest packages from PIP import_tasks: tempest_install_source.yml - when: (tempest_install_method | default('source')) == 'source' or (tempest_plugin_install_source | default(False)) + when: (tempest_install_method | default('source')) == 'source' or (tempest_install_method == 'distro' and ansible_distribution == 'Ubuntu') - name: Install stackviz on venv import_role: diff --git a/tasks/tempest_install_source.yml b/tasks/tempest_install_source.yml index e122da65..d830ff47 100644 --- a/tasks/tempest_install_source.yml +++ b/tasks/tempest_install_source.yml @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Note(noonedeadpunk) When tempest_plugin_install_source is true, we do not -# want pip packages to be installed inside venv, since tempest itself is -# installed via system packages so that plugins will be visible for tempest. - name: Install the python venv import_role: name: "python_venv_build" @@ -29,7 +26,6 @@ - section: "tempest" option: "venv_tag" value: "{{ tempest_venv_tag }}" - when: tempest_install_method | default('source') == 'source' - name: Get tempest plugins from git git: @@ -48,9 +44,7 @@ pip: name: "/opt/{{ item.name|replace('-', '_') }}_{{ item.branch|replace('/', '_') }}" state: "{{ tempest_pip_package_state }}" - virtualenv: "{{ tempest_plugin_install_source | ternary(omit, tempest_venv_bin | dirname) }}" - executable: "{{ tempest_plugin_install_source | ternary(tempest_install_pip_executable, omit) }}" - virtualenv_site_packages: "{{ tempest_plugin_install_source | ternary(omit, 'no') }}" + virtualenv: "{{ tempest_venv_bin | dirname }}" extra_args: >- {{ tempest_pip_install_args }} --constraint {{ tempest_upper_constraints_url }} @@ -66,9 +60,7 @@ pip: name: "{{ item.package }}" state: "{{ tempest_pip_package_state }}" - virtualenv: "{{ tempest_plugin_install_source | ternary(omit, tempest_venv_bin | dirname) }}" - executable: "{{ tempest_plugin_install_source | ternary(tempest_install_pip_executable, omit) }}" - virtualenv_site_packages: "{{ tempest_plugin_install_source | ternary(omit, 'no') }}" + virtualenv: "{{ tempest_venv_bin | dirname }}" extra_args: >- {{ tempest_pip_install_args }} --constraint {{ tempest_upper_constraints_url }} diff --git a/vars/main.yml b/vars/main.yml index 581f9402..991d580d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -43,14 +43,6 @@ tempest_images_map: properties: hw_firmware_type: uefi -# Note(noonedeadpunk): -# Ubuntu does not publish tempest plugin packages. They do -# all their testing using the source-based installation of -# tempest. -# For mixed setup we are using source install tasks, except -# that we're deploying pip packages without venv. -tempest_plugin_install_source: "{{ ((tempest_install_method == 'distro') and (ansible_os_family | lower == 'debian')) | bool }}" - # Each tempest plugin could take the following arguments: # - name: # repo: # when installing from a repo @@ -68,7 +60,7 @@ _tempest_plugins: - name: cinder-tempest-plugin repo: https://opendev.org/openstack/cinder-tempest-plugin branch: master - install: "{{ tempest_service_available_cinder | bool and not tempest_plugin_install_source }}" + install: "{{ tempest_service_available_cinder | bool }}" cloudkitty: - name: cloudkitty-tempest-plugin repo: https://opendev.org/openstack/cloudkitty-tempest-plugin @@ -88,7 +80,7 @@ _tempest_plugins: - name: heat-tempest-plugin repo: https://opendev.org/openstack/heat-tempest-plugin branch: master - install: "{{ tempest_service_available_heat | bool and not tempest_plugin_install_source }}" + install: "{{ tempest_service_available_heat | bool }}" ironic: - name: ironic-tempest-plugin repo: https://opendev.org/openstack/ironic-tempest-plugin @@ -133,7 +125,7 @@ _tempest_plugins: - name: neutron-tempest-plugin repo: https://opendev.org/openstack/neutron-tempest-plugin branch: master - install: "{{ tempest_service_available_neutron | bool and not tempest_plugin_install_source }}" + install: "{{ tempest_service_available_neutron | bool }}" novajoin: - name: novajoin-tempest-plugin repo: https://opendev.org/openstack/novajoin-tempest-plugin