aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/install.yaml
blob: c446b91f7d450b5664f49a13244e0774751e3483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
- hosts: localhost

  vars:
    arch_amd64: "amd64"
    arch_arm64: "arm64"
    inst_mode_container: "container"
    inst_mode_baremetal: "baremetal"
    ubuntu_archive:
      amd64: "http://archive.ubuntu.com/ubuntu/"
      arm64: "http://ports.ubuntu.com/ubuntu-ports/"
    installation_mode: "{{ INSTALLATION_MODE | default('baremetal') }}"
    yardstick_dir: "{{ YARDSTICK_DIR | default('/home/opnfv/repos/yardstick') }}"
    virtual_environment: "{{ VIRTUAL_ENVIRONMENT | default(False) }}"
    nsb_dir: "{{ NSB_DIR | default('/opt/nsb_bin/') }}"

  pre_tasks:

    - name: Create NSB binaries directory, accesible to any user
      file:
        path: "{{ nsb_dir }}"
        state: directory
        owner: root
        mode: 0777

  roles:
    - add_repos_jumphost
    - install_dependencies_jumphost
    - install_yardstick
    - configure_uwsgi
    - configure_nginx
    - download_trex
    - install_trex
    - configure_rabbitmq

  post_tasks:

    - service:
        name: nginx
        state: restarted
      when: installation_mode != inst_mode_container

    - shell: uwsgi -i /etc/yardstick/yardstick.ini
      when: installation_mode != inst_mode_container