diff --git a/ansible/roles/vm_deploy/tasks/main.yml b/ansible/roles/vm_deploy/tasks/main.yml
index a516b97..dcdceb5 100644
--- a/ansible/roles/vm_deploy/tasks/main.yml
+++ b/ansible/roles/vm_deploy/tasks/main.yml
@@ -41,19 +41,25 @@
--password ladmin:password:{{ hostvars[vm_name]['ansible_become_pass'] }} \
--root-password password:{{ hostvars[vm_name]['ansible_root_pass'] }} \
--password-crypto sha512 \
- --ssh-inject "ladmin:string:{{ }}"
+ --ssh-inject "ladmin:string:{{ hostvars[vm_name]['ssh_public_key_data'] }}"
- name: create container storage vhd
ansible.builtin.shell:
cmd: |
qemu-img create -f qcow2 {{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2 64G
- creates: "{{ root_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2"
+ creates: "{{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2"
- # - name: create data storage vhd
- # ansible.builtin.shell:
- # cmd: |
- # qemu-img create -f qcow2 {{ data_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2 4T
- # creates: "{{ data_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2"
+ - name: create nvme data storage vhd
+ ansible.builtin.shell:
+ cmd: |
+ qemu-img create -f qcow2 {{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2 64G
+ creates: "{{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2"
+
+ - name: create hdd data storage vhd
+ ansible.builtin.shell:
+ cmd: |
+ qemu-img create -f qcow2 {{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2 4T
+ creates: "{{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2"
- name: list vms
community.libvirt.virt:
diff --git a/ansible/roles/vm_deploy/templates/vm_template.xml.j2 b/ansible/roles/vm_deploy/templates/vm_template.xml.j2
index 3a0817d..4e420bd 100644
--- a/ansible/roles/vm_deploy/templates/vm_template.xml.j2
+++ b/ansible/roles/vm_deploy/templates/vm_template.xml.j2
@@ -51,6 +51,16 @@
+
+
+
+
+
+
+
+
+
+