diff --git a/bigboot-wip.yml b/bigboot-wip.yml new file mode 100644 index 0000000..1955fd2 --- /dev/null +++ b/bigboot-wip.yml @@ -0,0 +1,25 @@ +--- +- 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/vgapplog-lvapplog" + # size: "52156661760" + + # - name: Expand the /boot partition as requested + # ansible.builtin.import_role: + # name: infra.lvm_snapshots.bigboot diff --git a/bigboot_setup_environment.yml b/bigboot_setup_environment.yml index bd7dd06..8cb11f9 100644 --- a/bigboot_setup_environment.yml +++ b/bigboot_setup_environment.yml @@ -25,7 +25,7 @@ bigboot_execute_shrink_lv: "{{ bigboot_execute_shrink_lv }}" bigboot_adjacent_lvm_device: "{{ bigboot_adjacent_lvm_device }}" bigboot_lv_shrink_size: "{{ bigboot_lv_shrink_size | int }}" - bigboot_size: "{{ bigboot_size }}" + bigboot_partition_size: "{{ bigboot_partition_size }}" bigboot_skip_rear_backup: "{{ bigboot_skip_rear | default('false') }}" per_host: false aggregate: false diff --git a/collections/requirements.yml b/collections/requirements.yml index 1f04f19..ddc90a3 100644 --- a/collections/requirements.yml +++ b/collections/requirements.yml @@ -17,6 +17,6 @@ collections: version: 1.5.4 - name: infra.lvm_snapshots - version: 2.0.2 + version: 2.1.0 ... diff --git a/tasks/capture_boot_device_details.yml b/tasks/capture_boot_device_details.yml index c66ab36..4a5584b 100644 --- a/tasks/capture_boot_device_details.yml +++ b/tasks/capture_boot_device_details.yml @@ -19,7 +19,7 @@ - name: Capture required expansion space ansible.builtin.set_fact: bigboot_expansion_diff: - "{{ bigboot_size_target | human_to_bytes - bigboot_boot_partsize | human_to_bytes }}" + "{{ bigboot_partition_size | human_to_bytes - bigboot_boot_partsize | human_to_bytes }}" - name: Convert size difference to MB ansible.builtin.set_fact: @@ -27,7 +27,7 @@ - name: Set bigboot size 4k aligned ansible.builtin.set_fact: - bigboot_size: "{{ bigboot_size_expansion_mb[:-2] | int | get_block_size_up }}" + bigboot_partition_size: "{{ bigboot_size_expansion_mb[:-2] | int | get_block_size_up }}" - name: Validate if we need to expand boot block: @@ -48,4 +48,4 @@ - name: Expansion of /boot required ansible.builtin.debug: - msg: "Will need to expand /boot by an additional {{ bigboot_size }}." + msg: "Will need to expand /boot by an additional {{ bigboot_partition_size }}." diff --git a/tasks/capture_lv_device_details.yml b/tasks/capture_lv_device_details.yml index cca14c0..86574b4 100644 --- a/tasks/capture_lv_device_details.yml +++ b/tasks/capture_lv_device_details.yml @@ -87,7 +87,7 @@ bigboot_lv_pe_size_in_mb: "{{ bigboot_lv_vg_free_pe | regex_replace('i|\\s+|<', '') | human_to_bytes | human_readable(unit='M') }}" -- name: Verify if there's available PE or not and execute Shrink_LV +- name: Verify available PE for the volume group block: - name: Set flag for Shrink_LV execution ansible.builtin.set_fact: diff --git a/vars/bigboot_vars.yml b/vars/bigboot_vars.yml index d680b89..af7317e 100644 --- a/vars/bigboot_vars.yml +++ b/vars/bigboot_vars.yml @@ -1,7 +1,7 @@ --- ansible_ssh_retries: 10 -bigboot_size_target: 1G +bigboot_partition_size: 1.5G bigboot_post_reboot_delay: 70 bigboot_reboot_timeout: 1800