Merge "Add a document describing vIPSEC testcase"
[yardstick.git] / ansible / build_vm.yml
1 - name: Prepare to build VM
2   hosts: jumphost
3   become: yes
4   vars:
5     img_prop_item: "{{ IMG_PROPERTY }}"
6     img_arch: "{{ YARD_IMG_ARCH }}"
7
8   tasks:
9     - name: Include pre-build
10       include_role:
11         name: build_yardstick_image
12         tasks_from: pre_build.yml
13       when:
14         - installation_mode != inst_mode_container
15
16
17 - name: Build VM in chroot
18   hosts: chroot_image
19   connection: chroot
20   become: yes
21   vars:
22     img_property: "{{ IMG_PROPERTY }}"
23   environment: "{{ proxy_env }}"
24
25   tasks:
26     - name: Include image build
27       include_role:
28         name: build_yardstick_image
29         tasks_from: "cloudimg_modify_{{ img_property }}.yml"
30       when:
31         - installation_mode != inst_mode_container
32
33
34 - name: Clear up after VM is built
35   hosts: jumphost
36   become: yes
37
38   tasks:
39     - name: Include post-build
40       include_role:
41         name: build_yardstick_image
42         tasks_from: post_build.yml
43       when:
44         - installation_mode != inst_mode_container