This commit is contained in:
2025-06-03 10:15:28 -04:00
parent 68140fc346
commit 8b1e65188c
2 changed files with 8 additions and 5 deletions

View File

@ -16,14 +16,10 @@
that: bigboot_lv_info['size_available'] > bigboot_expansion_diff | int
fail_msg: There is not enough free space available to shrink the filesystem
- name: Debug bigboot_lv_info
ansible.builtin.debug:
msg: "{{ bigboot_lv_info['size_available'] }} - {{ bigboot_expansion_diff }} == {{ (bigboot_lv_info['size_available'] - bigboot_expansion_diff | int) }} -> {{ bigboot_lv_size_min | human_to_bytes }}"
- name: Assert that there will be enough space left over on the target LV
ansible.builtin.assert:
that: (bigboot_lv_info['size_available'] - bigboot_expansion_diff | int) >= bigboot_lv_size_min | human_to_bytes
success_msg: "There will be enough space left over with a boot size of {{ bigboot_size_target_fallback | int | human_readable(unit='G') }}. ({{ (bigboot_lv_info['size_available'] - bigboot_expansion_diff | int) | human_readable(unit='M') }})"
success_msg: "There will be enough space left over with a boot size of {{ bigboot_size_target_fallback | int | human_readable(unit='G') }}. ({{ (bigboot_lv_info['size_available'] - bigboot_expansion_diff | int) | human_readable(unit='B') }})"
fail_msg: "There will NOT be enough space left over with a boot size of {{ bigboot_size_target_fallback | int | human_readable(unit='G') }}. Aborting Bigboot execution."
rescue: