refine disks

This commit is contained in:
2022-10-30 02:39:44 +13:00
parent ba5672b72a
commit 03700ba0fb
2 changed files with 23 additions and 7 deletions

View File

@ -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: