Make root LV size dynamic based on VM disk size

This commit is contained in:
Sandwich 2024-10-31 01:29:48 +01:00
parent ccf3193c92
commit 2c4995ede8

View File

@ -43,7 +43,8 @@
size: "{{ item.size }}" size: "{{ item.size }}"
state: present state: present
loop: loop:
- { lv: root, size: 12G } - { lv: root, size: "{{ '12G' if (vm_size | int * 0.4) < 12
else (vm_size | int * 0.4) | round(0, 'ceil') | int | string + 'G' }}" }
- { lv: home, size: 2G } - { lv: home, size: 2G }
- { lv: var, size: 2G } - { lv: var, size: 2G }
- { lv: var_log, size: 2G } - { lv: var_log, size: 2G }