This commit is contained in:
2025-06-25 16:11:18 -04:00
parent 5d18d161fe
commit 6e8726bddd
2 changed files with 5 additions and 10 deletions

View File

@ -41,7 +41,7 @@
that: bigboot_boot_partsize | human_to_bytes >= bigboot_size_min | human_to_bytes that: bigboot_boot_partsize | human_to_bytes >= bigboot_size_min | human_to_bytes
success_msg: > success_msg: >
/boot partition size is already at least {{ bigboot_size_min }} /boot partition size is already at least {{ bigboot_size_min }}
or greater. Nothing to do." or greater. Nothing to do.
fail_msg: > fail_msg: >
/boot partition size is less than {{ bigboot_size_min }}. /boot partition size is less than {{ bigboot_size_min }}.
Expansion of /boot is required. Expansion of /boot is required.
@ -54,5 +54,5 @@
- name: Expansion of /boot required - name: Expansion of /boot required
ansible.builtin.debug: ansible.builtin.debug:
msg: > msg: >
Will attempt to increase to {{ bigboot_size_target }}, or Will attempt to increase to {{ bigboot_size_target }},
{{ bigboot_size_min }} at the minimum." or {{ bigboot_size_min }} at the minimum.

View File

@ -66,7 +66,7 @@
- name: Capture shrink and fallback sizes - name: Capture shrink and fallback sizes
ansible.builtin.set_fact: ansible.builtin.set_fact:
# we need to get the BLOCK size total, not the filesystem # we need to get the BLOCK size total, not the filesystem
bigboot_lv_shrink_size: "{{ (bigboot_lv_partsize | int - bigboot_expansion_diff | int) | get_block_size_down_bytes }}" bigboot_lv_shrink_size: "{{ bigboot_lv_partsize | int - bigboot_expansion_diff | int }}"
bigboot_size_target_fallback: "{{ bigboot_size_target_fallback | int | human_readable(unit='G') | regex_replace('\\sGB', 'G') }}" bigboot_size_target_fallback: "{{ bigboot_size_target_fallback | int | human_readable(unit='G') | regex_replace('\\sGB', 'G') }}"
- name: Debug bigboot_lv_shrink_size and bigboot_size_target_fallback - name: Debug bigboot_lv_shrink_size and bigboot_size_target_fallback
@ -108,14 +108,9 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
bigboot_lv_vg_pe_size: "{{ bigboot_lv_vg_pe_capture | regex_replace('^.*\\s+(\\d+.\\d+).*$', '\\1M') | human_to_bytes }}" bigboot_lv_vg_pe_size: "{{ bigboot_lv_vg_pe_capture | regex_replace('^.*\\s+(\\d+.\\d+).*$', '\\1M') | human_to_bytes }}"
- name: Subtract one additional PE for shrinking - name: Subtract an additional 2 PE for shrinking
ansible.builtin.set_fact: ansible.builtin.set_fact:
bigboot_lv_shrink_size: "{{ bigboot_lv_shrink_size | int - (bigboot_lv_vg_pe_size | int * 2) }}" bigboot_lv_shrink_size: "{{ bigboot_lv_shrink_size | int - (bigboot_lv_vg_pe_size | int * 2) }}"
# when:
# - bigboot_size_target_fallback | human_to_bytes < bigboot_size_target | human_to_bytes
# - name: Kill the play
# ansible.builtin.meta: end_host
- name: Capture the PV device - name: Capture the PV device
ansible.builtin.set_fact: ansible.builtin.set_fact: