Merge "Test case description and configuration file for yardstick_tc089"
[yardstick.git] / ansible / install.yaml
1 ---
2 - hosts: localhost
3
4   vars:
5     arch_amd64: "amd64"
6     arch_arm64: "arm64"
7     inst_mode_container: "container"
8     inst_mode_baremetal: "baremetal"
9     ubuntu_archive:
10       amd64: "http://archive.ubuntu.com/ubuntu/"
11       arm64: "http://ports.ubuntu.com/ubuntu-ports/"
12     installation_mode: "{{ INSTALLATION_MODE | default('baremetal') }}"
13     yardstick_dir: "{{ YARDSTICK_DIR | default('/home/opnfv/repos/yardstick') }}"
14     virtual_environment: "{{ VIRTUAL_ENVIRONMENT | default(False) }}"
15     nsb_dir: "{{ NSB_DIR | default('/opt/nsb_bin/') }}"
16
17   pre_tasks:
18
19     - name: Create NSB binaries directory, accesible to any user
20       file:
21         path: "{{ nsb_dir }}"
22         state: directory
23         owner: root
24         mode: 0777
25
26   roles:
27     - add_repos_jumphost
28     - install_dependencies_jumphost
29     - install_yardstick
30     - configure_uwsgi
31     - configure_nginx
32     - download_trex
33     - install_trex
34     - configure_rabbitmq
35
36   post_tasks:
37
38     - service:
39         name: nginx
40         state: restarted
41       when: installation_mode != inst_mode_container
42
43     - shell: uwsgi -i /etc/yardstick/yardstick.ini
44       when: installation_mode != inst_mode_container