fixes for lv sizes
All checks were successful
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-centos9) (push) Successful in 15s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian11) (push) Successful in 13s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian12) (push) Successful in 13s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-fedora39) (push) Successful in 15s

This commit is contained in:
Chris Hammer 2024-02-16 16:16:59 -05:00
parent 4b49a24665
commit b4cad68289
2 changed files with 4 additions and 4 deletions

View File

@ -6,6 +6,6 @@ bigboot_size: 1G
# We use padding just to ensure there's
# available space to expand /boot to.
#
# By default the value is 1.10, or 10%
# By default the value is 1.05, or 5%
# greater than bigboot_size
bigboot_shrink_padding: 1.10
bigboot_shrink_padding: 1.05

View File

@ -19,7 +19,7 @@
- name: Capture shrink size for logical volume
ansible.builtin.set_fact:
bigboot_lv_shrink_size: "{{ bigboot_lv_info.size_total - bigboot_expansion_diff | int }}"
bigboot_lv_shrink_size: "{{ bigboot_lv_info.size_total - bigboot_expansion_diff | human_to_bytes }}"
- name: Capture logical volume name
ansible.builtin.shell:
@ -79,4 +79,4 @@
vars:
shrink_lv_devices:
- device: "{{ bigboot_adjacent_lvm_device | trim }}"
size: "{{ bigboot_lv_shrink_size | int | human_readable | regex_replace('^(.*\\.\\d+)\\s+(\\w).*$', '\\1\\2') }}"
size: "{{ (bigboot_lv_shrink_size | int / bigboot_shrink_padding) | regex_replace('\\..*$', '') }}"