This commit is contained in:
2025-05-07 17:00:48 -04:00
parent 9008c28110
commit 2d7764c183
4 changed files with 18 additions and 14 deletions

View File

@ -5,7 +5,7 @@
- name: Fail if /boot can't expand to at least 1GB
ansible.builtin.assert:
that: bigboot_size_target_fallback | human_to_bytes > 1073741824
that: bigboot_size_target_fallback | human_to_bytes > bigboot_size_min | human_to_bytes
fail_msg: "{{ bigboot_size_target_fallback | int | human_readable(unit='M') }} is less than the minimum of 1GB for /boot"
- name: Verify available space and re-check if needed
@ -13,12 +13,12 @@
- name: Assert that there is space on the logical volume for shrinkage
ansible.builtin.assert:
that: bigboot_lv_info['size_available'] > bigboot_expansion_diff | int
fail_msg: There is not enough space available for LV shrinking.
fail_msg: There is not enough free space available to shrink the filesystem
rescue:
- name: Decrement size target by .25G
ansible.builtin.set_fact:
bigboot_size_target_fallback: "{{ bigboot_size_target_fallback | human_to_bytes - 262144000 }}"
bigboot_size_target_fallback: "{{ bigboot_size_target_fallback | human_to_bytes - bigboot_size_decrement | human_to_bytes }}"
- name: Update required expansion space
ansible.builtin.set_fact: