aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/build_vm.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/build_vm.yml')
-rw-r--r--ansible/build_vm.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/ansible/build_vm.yml b/ansible/build_vm.yml
new file mode 100644
index 000000000..9774f9ff5
--- /dev/null
+++ b/ansible/build_vm.yml
@@ -0,0 +1,44 @@
+- name: Prepare to build VM
+ hosts: jumphost
+ become: yes
+ vars:
+ img_prop_item: "{{ IMG_PROPERTY }}"
+ img_arch: "{{ YARD_IMG_ARCH }}"
+
+ tasks:
+ - name: Include pre-build
+ include_role:
+ name: build_yardstick_image
+ tasks_from: pre_build.yml
+ when:
+ - installation_mode != inst_mode_container
+
+
+- name: Build VM in chroot
+ hosts: chroot_image
+ connection: chroot
+ become: yes
+ vars:
+ img_property: "{{ IMG_PROPERTY }}"
+ environment: "{{ proxy_env }}"
+
+ tasks:
+ - name: Include image build
+ include_role:
+ name: build_yardstick_image
+ tasks_from: "cloudimg_modify_{{ img_property }}.yml"
+ when:
+ - installation_mode != inst_mode_container
+
+
+- name: Clear up after VM is built
+ hosts: jumphost
+ become: yes
+
+ tasks:
+ - name: Include post-build
+ include_role:
+ name: build_yardstick_image
+ tasks_from: post_build.yml
+ when:
+ - installation_mode != inst_mode_container