Updates to allow Bigboot to decrement from the default target size, down to a minimum threshold of 1GB

This commit is contained in:
2025-04-30 22:22:11 -04:00
parent 212ace2d6d
commit a3021ac84e
8 changed files with 45 additions and 33 deletions

View File

@ -42,15 +42,25 @@
bigboot_lv_info: "{{ ansible_facts.mounts \
| selectattr('device', 'equalto', bigboot_adjacent_lvm_device) | first }}"
- 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.
# - 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.
- name: Check for available space and fallback if needed
ansible.builtin.import_tasks: check_space_fallback.yml
- name: Capture shrink size for logical volume
ansible.builtin.set_fact:
bigboot_lv_shrink_size: "{{ bigboot_lv_info.size_total - bigboot_expansion_diff | int }}"
- name: Debug bigboot_lv_shrink_size
ansible.builtin.debug:
msg: "{{ bigboot_lv_shrink_size | int | human_readable(unit='M') }}"
- name: Kill the play
ansible.builtin.meta: end_host
- name: Capture logical volume name
ansible.builtin.shell:
cmd: |