Do you work under AAP now?
This commit is contained in:
@ -47,6 +47,10 @@
|
||||
# that: bigboot_lv_info.size_available > bigboot_expansion_diff | int
|
||||
# fail_msg: There is not enough space available for LV shrinking.
|
||||
|
||||
- name: Copy size target to temporary variable
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_size_target_fallback: "{{ bigboot_size_target | human_to_bytes }}"
|
||||
|
||||
- name: Check for available space and fallback if needed
|
||||
ansible.builtin.include_tasks: check_space_fallback.yml
|
||||
|
||||
@ -58,8 +62,8 @@
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ bigboot_lv_shrink_size | int | human_readable(unit='M') }}"
|
||||
|
||||
# - name: Kill the play
|
||||
# ansible.builtin.meta: end_host
|
||||
- name: Kill the play
|
||||
ansible.builtin.meta: end_host
|
||||
|
||||
- name: Capture logical volume name
|
||||
ansible.builtin.shell:
|
||||
|
@ -1,20 +1,12 @@
|
||||
---
|
||||
- name: Debug bigboot_size_target
|
||||
ansible.builtin.debug:
|
||||
var: bigboot_size_target
|
||||
|
||||
- name: Convert size target to bytes
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_size_target: "{{ bigboot_size_target | human_to_bytes }}"
|
||||
|
||||
- name: Debug bigboot_expansion_diff
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ bigboot_expansion_diff }} + {{ bigboot_size_target }}"
|
||||
msg: "{{ bigboot_expansion_diff }} + {{ bigboot_size_target_fallback }}"
|
||||
|
||||
- name: Fail if /boot can't expand to at least 1GB
|
||||
ansible.builtin.assert:
|
||||
that: bigboot_size_target | human_to_bytes > 1073741824
|
||||
fail_msg: "{{ bigboot_size_target | int | human_readable(unit='M') }} is less than the minimum of 1GB for /boot"
|
||||
that: bigboot_size_target_fallback | human_to_bytes > 1073741824
|
||||
fail_msg: "{{ bigboot_size_target_fallback | int | human_readable(unit='M') }} is less than the minimum of 1GB for /boot"
|
||||
|
||||
- name: Verify available space and re-check if needed
|
||||
block:
|
||||
@ -26,12 +18,12 @@
|
||||
rescue:
|
||||
- name: Decrement size target by .25G
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_size_target: "{{ bigboot_size_target | human_to_bytes - 262144000 }}"
|
||||
bigboot_size_target_fallback: "{{ bigboot_size_target_fallback | human_to_bytes - 262144000 }}"
|
||||
|
||||
- name: Update required expansion space
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_expansion_diff:
|
||||
"{{ bigboot_size_target | human_to_bytes - bigboot_boot_partsize | human_to_bytes }}"
|
||||
"{{ bigboot_size_target_fallback | human_to_bytes - bigboot_boot_partsize | human_to_bytes }}"
|
||||
|
||||
- name: Re-check disk space - RESCUE
|
||||
ansible.builtin.include_tasks: check_space_fallback.yml
|
||||
|
Reference in New Issue
Block a user