Use bigboot_size_target instead of the calculated size diff

This commit is contained in:
Chris Hammer 2024-08-20 17:38:13 -04:00
parent 7ad8d715af
commit 7b447e0fd2
2 changed files with 28 additions and 1 deletions

27
bigboot-wip.yml Normal file
View File

@ -0,0 +1,27 @@
---
- name: Perform logical volume and boot parition resizing as needed
hosts: all
become: true
gather_facts: true
strategy: free
vars_files:
- bigboot_vars.yml
tasks:
- name: Cleanup from any previous executions
ansible.builtin.import_tasks: tasks/cleanup.yml
- name: Shrink the logical volume to support /boot expansion
ansible.builtin.import_role:
name: infra.lvm_snapshots.shrink_lv
vars:
shrink_lv_devices:
- device: "/dev/mapper/system-root"
size: "53687091200"
- name: Expand the /boot partition as requested
ansible.builtin.import_role:
name: infra.lvm_snapshots.bigboot
vars:
bigboot_partition_size: "{{ bigboot_size_target }}"

View File

@ -35,7 +35,7 @@
ansible.builtin.import_role: ansible.builtin.import_role:
name: infra.lvm_snapshots.bigboot name: infra.lvm_snapshots.bigboot
vars: vars:
bigboot_partition_size: "{{ bigboot_data[inventory_hostname]['bigboot_size'] }}" bigboot_partition_size: "{{ bigboot_size_target }}"
when: when:
- bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | bool - bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | bool