diff options
Diffstat (limited to 'xci/playbooks/roles/prepare-tests/tasks/main.yml')
-rw-r--r-- | xci/playbooks/roles/prepare-tests/tasks/main.yml | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/xci/playbooks/roles/prepare-tests/tasks/main.yml b/xci/playbooks/roles/prepare-tests/tasks/main.yml new file mode 100644 index 00000000..a543ac1f --- /dev/null +++ b/xci/playbooks/roles/prepare-tests/tasks/main.yml @@ -0,0 +1,56 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017 SUSE Linux GmbH +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +- name: install required packages + package: + name: "{{ required_packages[ansible_pkg_mgr] }}" + update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" + state: present + +# Docker is needed for test frameworks +- name: Ensure Docker service is started and enabled + service: + name: docker + state: started + enabled: yes + +- name: install required pip packages + pip: + name: "{{ required_pip }}" + state: present + extra_args: '-c https://raw.githubusercontent.com/openstack/requirements/{{ requirements_git_install_branch }}/upper-constraints.txt' + +# odl scenarios require to add odl variables to env +- include_tasks: process_neutron_conf.yml + when: "'-odl-' in deploy_scenario" + +- name: prepare environment file for tests + template: + src: env.j2 + dest: /root/env + mode: 0755 + +- name: create the script to prepare for testing + template: + src: prepare-tests.sh.j2 + dest: /root/prepare-tests.sh + mode: 0755 + +- name: create the script to run functest + template: + src: run-functest.sh.j2 + dest: /root/run-functest.sh + mode: 0755 + +- name: create the script to run yardstick + template: + src: run-yardstick.sh.j2 + dest: /root/run-yardstick.sh + mode: 0755 |