From 6e8726bddd3e5763b6d0b6b23da0f5192e483504 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 25 Jun 2025 16:11:18 -0400 Subject: [PATCH] Updates --- tasks/capture_boot_device_details.yml | 6 +++--- tasks/capture_lv_device_details.yml | 9 ++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tasks/capture_boot_device_details.yml b/tasks/capture_boot_device_details.yml index 055d5b2..58405a5 100644 --- a/tasks/capture_boot_device_details.yml +++ b/tasks/capture_boot_device_details.yml @@ -41,7 +41,7 @@ that: bigboot_boot_partsize | human_to_bytes >= bigboot_size_min | human_to_bytes success_msg: > /boot partition size is already at least {{ bigboot_size_min }} - or greater. Nothing to do." + or greater. Nothing to do. fail_msg: > /boot partition size is less than {{ bigboot_size_min }}. Expansion of /boot is required. @@ -54,5 +54,5 @@ - name: Expansion of /boot required ansible.builtin.debug: msg: > - Will attempt to increase to {{ bigboot_size_target }}, or - {{ bigboot_size_min }} at the minimum." + Will attempt to increase to {{ bigboot_size_target }}, + or {{ bigboot_size_min }} at the minimum. diff --git a/tasks/capture_lv_device_details.yml b/tasks/capture_lv_device_details.yml index d0ed38d..11d5062 100644 --- a/tasks/capture_lv_device_details.yml +++ b/tasks/capture_lv_device_details.yml @@ -66,7 +66,7 @@ - name: Capture shrink and fallback sizes ansible.builtin.set_fact: # 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') }}" - name: Debug bigboot_lv_shrink_size and bigboot_size_target_fallback @@ -108,14 +108,9 @@ ansible.builtin.set_fact: 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: 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 ansible.builtin.set_fact: