summaryrefslogtreecommitdiff
path: root/roles/vm/guest/deploy/tasks/main.yml
blob: 1b4a4e637c106e802b725ccc24134b0a255869b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- name: make sure primary disk image path exists
  delegate_to: "{{ vm_host.name }}"
  file:
    path: "{{ vm_deploy_primary_disk.path | dirname }}"
    state: directory

- name: remove vm if it already exists
  import_role:
    name: vm/guest/remove

- name: deploy disk image
  delegate_to: "{{ vm_host.name }}"
  replace_vm_image:
    src: "{{ output_images | first }}"
    dest: "{{ vm_deploy_primary_disk.path }}"

- name: create vm
  vars:
    vm_create_installer: no
  import_role:
    name: vm/guest/create