diff --git a/ansible/roles/vm_deploy/defaults/main.yml b/ansible/roles/vm_deploy/defaults/main.yml index e7290f5..22d42af 100644 --- a/ansible/roles/vm_deploy/defaults/main.yml +++ b/ansible/roles/vm_deploy/defaults/main.yml @@ -18,4 +18,7 @@ vm_subnet_suffix: "/24" vm_gateway: "192.168.199.254" vm_domain: "balsillie.net" vm_machine_type: "pc-q35-7.1" -vm_machine_arch: "x86_64" \ No newline at end of file +vm_machine_arch: "x86_64" +containers_vhd_size: "64G" +data_nvme_vhd_size: "64G" +data_hdd_vhd_size: "3T" \ No newline at end of file diff --git a/ansible/roles/vm_deploy/tasks/deploy.yaml b/ansible/roles/vm_deploy/tasks/deploy.yaml index aac4e3c..b009f7a 100644 --- a/ansible/roles/vm_deploy/tasks/deploy.yaml +++ b/ansible/roles/vm_deploy/tasks/deploy.yaml @@ -37,8 +37,8 @@ when: root_vhd_created is changed ansible.builtin.shell: cmd: | - virt-customize -a {{ root_vhd_pool_dir }}/{{ vm_name }}_vda.qcow2 \ - --format qcow2 \ + virt-customize --format qcow2 \ + -a {{ root_vhd_pool_dir }}/{{ vm_name }}_vda.qcow2 \ --hostname {{ vm_name }}.{{ vm_domain }} \ --copy-in /tmp/eno1_{{ vm_name }}.network:/etc/systemd/network/10-eno1.network \ --append-line "/etc/hosts:127.0.1.1 {{ vm_name }}.{{ vm_domain }} {{ vm_name }}" @@ -55,19 +55,19 @@ - name: create container storage vhd ansible.builtin.shell: cmd: | - qemu-img create -f qcow2 {{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2 64G + qemu-img create -f qcow2 {{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2 {{ containers_vhd_size }} creates: "{{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.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 + qemu-img create -f qcow2 {{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2 {{ data_nvme_vhd_size }} 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 + qemu-img create -f qcow2 {{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2 {{ data_hdd_vhd_size }} creates: "{{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2" - name: define vm