Updates
This commit is contained in:
@ -54,16 +54,14 @@
|
||||
- name: Check for available space and fallback if needed
|
||||
ansible.builtin.include_tasks: check_space_fallback.yml
|
||||
|
||||
- name: Capture shrink size for logical volume
|
||||
- name: Capture shrink and fallback sizes
|
||||
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 | int }}"
|
||||
bigboot_size_target_fallback: "{{ bigboot_size_target_fallback | int | human_readable(unit='G') | regex_replace('\\sGB', 'G') }}"
|
||||
|
||||
- name: Debug bigboot_lv_shrink_size
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ bigboot_lv_shrink_size | int | human_readable(unit='M') }}"
|
||||
|
||||
- name: Kill the play
|
||||
ansible.builtin.meta: end_host
|
||||
# - name: Debug sizes
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ bigboot_lv_shrink_size }} <-> {{ bigboot_size_target_fallback }}"
|
||||
|
||||
- name: Capture logical volume name
|
||||
ansible.builtin.shell:
|
||||
@ -76,7 +74,7 @@
|
||||
|
||||
- name: Format logical volume name
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_lv_vg_name: "{{ bigboot_lv_vg_name.stdout | regex_replace('VG\\s+Name\\s+(.*)$', '\\1') }}"
|
||||
bigboot_lv_vg_name: "{{ bigboot_lv_vg_name['stdout'] | regex_replace('VG\\s+Name\\s+(.*)$', '\\1') }}"
|
||||
|
||||
- name: Capture volume group free PE
|
||||
ansible.builtin.shell:
|
||||
@ -98,13 +96,17 @@
|
||||
# Free PE / Size 189 / 756.00 MiB"
|
||||
# Free PE / Size 414 / <1.62 GiB
|
||||
# Free PE / Size 0 / 0
|
||||
bigboot_lv_vg_free_pe: "{{ bigboot_lv_vg_free_pe.stdout | regex_replace('^.*/.*/\\s+[<]?(.*)', '\\1') }}"
|
||||
bigboot_lv_vg_free_pe: "{{ bigboot_lv_vg_free_pe['stdout'] | regex_replace('^.*/.*/\\s+[<]?(.*)', '\\1') }}"
|
||||
|
||||
- name: Get size in MB for PE and
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_lv_pe_size_in_mb:
|
||||
"{{ bigboot_lv_vg_free_pe | regex_replace('i|\\s+|<', '') | human_to_bytes | human_readable(unit='M') }}"
|
||||
|
||||
# - name: Debug size vars
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ bigboot_lv_pe_size_in_mb[:-3] | int | round }} <-> {{ bigboot_size[:-1] }}"
|
||||
|
||||
- name: Verify available PE for the volume group
|
||||
block:
|
||||
- name: Set flag for Shrink_LV execution
|
||||
|
Reference in New Issue
Block a user