fixes for boot partition 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 14s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-fedora39) (push) Successful in 15s
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 14s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-fedora39) (push) Successful in 15s
This commit is contained in:
@ -1,13 +1,21 @@
|
||||
---
|
||||
- name: Get /boot mount information
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_boot_info: "{{ ansible_facts.mounts \
|
||||
bigboot_boot_mount: "{{ ansible_facts.mounts \
|
||||
| selectattr('mount', 'equalto', '/boot') | first }}"
|
||||
|
||||
- name: Capture device for /boot
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_boot_device: "{{ bigboot_boot_mount.device | regex_replace('^.*/(\\w+$)', '\\1') }}"
|
||||
|
||||
- name: Capture partition side for /boot parition
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_boot_partsize: "{{ ansible_devices[bigboot_boot_device[:-1]].partitions[bigboot_boot_device].size }}"
|
||||
|
||||
- name: Capture required expansion space
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_expansion_diff:
|
||||
"{{ bigboot_size | human_to_bytes - bigboot_boot_info.size_total | int }}"
|
||||
"{{ bigboot_size | human_to_bytes - bigboot_boot_partsize | human_to_bytes }}"
|
||||
|
||||
- name: Convert size difference to MB
|
||||
ansible.builtin.set_fact:
|
||||
@ -15,7 +23,7 @@
|
||||
|
||||
- name: Set bigboot size 4k aligned
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_size: "{{ bigboot_size_expansion_mb[:-2] \
|
||||
bigboot_size_target: "{{ bigboot_size_expansion_mb[:-2] \
|
||||
| regex_replace('\\.\\d+ ', '') \
|
||||
| int | get_block_size_up }}"
|
||||
|
||||
@ -33,4 +41,4 @@
|
||||
rescue:
|
||||
- name: Expansion of /boot required
|
||||
ansible.builtin.debug:
|
||||
msg: "Expanding /boot by an additional {{ bigboot_size }}."
|
||||
msg: "Expanding /boot by an additional {{ bigboot_size_target }}."
|
||||
|
Reference in New Issue
Block a user