diff options
author | Stepan Andrushko <stepanx.andrushko@intel.com> | 2019-02-11 21:10:54 +0200 |
---|---|---|
committer | Stepan Andrushko <stepanx.andrushko@intel.com> | 2019-03-19 18:43:50 +0200 |
commit | 91d4cfa839bb2633cba2f70443168c22f895a969 (patch) | |
tree | a416ea03d2dceba496e29437dc37dc7c80fbc80e /ansible/build_vm.yml | |
parent | 4c995d8a3ad25afe2ad8d75d43c7519ce22797eb (diff) |
Move VM image build to remote DUT
VM image is built on localhost but should be on remote DUT server.
VM image will be built on server added to group 'yardstick-standalone'.
NSB dependencies will be installed on servers added to groups
'yardstick-baremetal' and 'yardstick-standalone'.
Added extra package installation, copy VM image to libvirt folder.
JIRA: YARDSTICK-1597
Change-Id: Iac4444c6f332c5ea80da033f2fe8371e208d7fbc
Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
Diffstat (limited to 'ansible/build_vm.yml')
-rw-r--r-- | ansible/build_vm.yml | 44 |
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 |