Refactor userguide "Yardstick Installation"
[yardstick.git] / ansible / load_images.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   vars:
19     YARD_IMG_ARCH: amd64
20     HW_FW_TYPE: "{{ HW_FW_TYPES[YARD_IMG_ARCH] }}"
21     HW_FW_TYPES:
22       amd64: ''
23       arm64: 'uefi'
24     DEPLOY_VARS:
25       'lxd':
26         IMAGE_COMMAND: yardstick-img-lxd-modify
27         IMAGE_OUTPUT: "/tmp/workspace/yardstick/yardstick-image.img"
28       'default':
29         IMAGE_COMMAND: yardstick-img-modify
30         IMAGE_OUTPUT: "/tmp/workspace/yardstick/yardstick-image.tar.gz"
31
32 #    QCOW_IMAGE: "/tmp/workspace/yardstick/yardstick-image.img"
33 #    RAW_IMAGE: "/tmp/workspace/yardstick/yardstick-image.tar.gz"
34 #    IMAGE_COMMANDS:
35 #      'lxd': yardstick-img-lxd-modify
36 #      'default': yardstick-img-modify
37
38
39   roles:
40     - role: add_fuel_jumphost
41       when: "INSTALLER_TYPE == 'fuel'"
42     - role: detect_fuel_arch
43       when: "INSTALLER_TYPE == 'fuel'"
44
45 #  post_tasks:
46 #
47 #    - command: "{{ DEPLOY_VARS[DEPLOY_SCENARIO].IMAGE_COMMAND }}" "{{ IMAGE_MODIFY_SCRIPT }}"
48 #      become: true
49 #      register: image_modify_result
50 #      retries: 2
51 #      untils: image_modify_result|succeeded
52 #
53 #    - stat: path="{{ DEPLOY_VARS[DEPLOY_SCENARIO].IMAGE_OUTPUT }}"}
54 #      register: output_stat
55 #
56 #    - fail: msg=""
57 #      when: not output_stat
58
59
60 - include: build_yardstick_image.yml
61
62 - include: image_uploaders/upload_yardstick_image.yml
63
64 # upload cirros
65 # upload vanilla ubuntu cloud_image
66
67 # - include: create_flavors.yml
68
69