diff options
Diffstat (limited to 'roles/bhyve/tasks')
-rw-r--r-- | roles/bhyve/tasks/guest.yml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/roles/bhyve/tasks/guest.yml b/roles/bhyve/tasks/guest.yml index b24b434..e88e511 100644 --- a/roles/bhyve/tasks/guest.yml +++ b/roles/bhyve/tasks/guest.yml @@ -5,17 +5,18 @@ --- - name: check vm directory - stat: path="/data/bhyve/{{ guest.name }}" - register: st + stat: + path: "{{ bhyve_dir }}/{{ guest.name }}" + register: result -- name: create all disks bound with current host +- name: create all disks for guest shell: vm create -s "{{ guest.disks[0].size }}" "{{ guest.name }}" - when: st.stat.isdir is not defined + when: result.stat.isdir is not defined -- name: create guest configuration +- name: generate guest configuration template: src: "templates/{{ guest.image }}.conf.j2" - dest: "/data/bhyve/{{ guest.name }}/{{ guest.name }}.conf" + dest: "{{ bhyve_dir}}/{{ guest.name }}/{{ guest.name }}.conf" vars: guest_cpu: "{{ guest.cpu }}" guest_memory: "{{ guest.memory }}" |