Merge "Upload config files for barometer collectd container"
[yardstick.git] / ansible / nsb_setup.yml
1 # Copyright (c) 2017 Intel Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 ---
15 - name: Prepare baremetal machine
16   include: ubuntu_server_baremetal_deploy_samplevnfs.yml
17   vars:
18     YARD_IMG_ARCH: amd64
19
20 - name: Install jumphost dependencies and configure docker
21   hosts: jumphost
22   environment:
23     "{{ proxy_env }}"
24   roles:
25     - install_dependencies_jumphost
26     - docker
27
28 - name: "handle all openstack stuff when: openrc_file is defined"
29   include: prepare_openstack.yml
30   when: openrc_file is defined
31
32 - name: start yardstick container on jumphost
33   hosts: jumphost
34   tasks:
35     - name: Start yardstick container
36       docker_container:
37         name: yardstick
38         pull: yes
39         recreate: yes
40         image: "{{ yardstick_docker_image|default('opnfv/yardstick:latest') }}"
41         state: started
42         restart_policy: always
43         privileged: yes
44         interactive: yes
45         volumes:
46           - "{{ openrc_file|default('/dev/null') }}:/etc/yardstick/openstack.creds:ro"
47           - /var/run/docker.sock:/var/run/docker.sock
48           - /opt:/opt
49           - /etc/localtime:/etc/localtime:ro