Update Intel Copyright for files edited in 2019
[yardstick.git] / ansible / prepare_env.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 - hosts: yardstick
16   vars_files:
17     - yardstick_config.yml
18
19   pre_tasks:
20     - name: check for openrc
21       stat: path="{{ OPENRC }}"
22       ignore_errors: yes
23       register: openrc_stat
24
25     - set_fact:
26         openrc_present: "{{ openrc_stat.stat.isreg|default(False) }}"
27
28     - fail: msg="{{ INSTALLER_TYPE }} not in {{ INSTALLERS }}"
29       when: not openrc_present and (INSTALLER_TYPE not in INSTALLERS)
30
31
32   roles:
33     - role: convert_openrc
34       openrc_file: "{{ OPENRC }}"
35       cloud_yaml_path: "{{ opnfv_root }}/clouds.yaml"
36     - role: create_storperf_admin_rc
37     - role: add_fuel_jumphost
38       when: "INSTALLER_TYPE == 'fuel'"
39
40
41   post_tasks:
42     # if huawei-pod1 then copy storeperf_adminrc to deployment location?
43     - name: add huawei-pod1 so we can copy storeperf_admin-rc to pod
44       add_host:
45         name: huawei-pod1
46         ansible_ssh_host: "192.168.200.1"
47         ansible_ssh_pass: root
48         ansible_ssh_use: root
49       when: "NODE_NAME == 'huawei-pod1'"
50
51
52 - hosts: huawei-pod1
53   tasks:
54     - name: copy a admin-rc file for StorPerf integration to the deployment location
55       copy:
56         src: "{{ storperf_rc }}"
57         dest: /root/
58
59
60 - hosts: fuel_jumphost
61   roles:
62     - create_fuel_pod_yaml
63
64
65