Variable re-naming and cleanup
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:
Chris Hammer 2024-02-19 12:06:56 -05:00
parent edde6e4ada
commit 3959866954
3 changed files with 7 additions and 8 deletions

View File

@ -5,7 +5,7 @@
gather_facts: true gather_facts: true
vars: vars:
bigboot_size: 1G bigboot_size_target: 1G
tasks: tasks:
- name: Capture boot device details - name: Capture boot device details
@ -15,7 +15,6 @@
ansible.builtin.import_tasks: tasks/bigboot_manage_lv.yml ansible.builtin.import_tasks: tasks/bigboot_manage_lv.yml
- name: Expand the /boot partition as requested - name: Expand the /boot partition as requested
ansible.builtin.import_role: ansible.builtin.include_role:
name: infra.lvm_snapshots.bigboot name: infra.lvm_snapshots.bigboot
vars:
bigboot_size: "{{ bigboot_size_target }}"

View File

@ -66,7 +66,7 @@
block: block:
- name: Assert if we need to execute the shrink_lv role to gain free PE - name: Assert if we need to execute the shrink_lv role to gain free PE
ansible.builtin.assert: ansible.builtin.assert:
that: (bigboot_lv_pe_size_in_mb[:-3] | int | round) | int > bigboot_size_target[:-1] | int that: (bigboot_lv_pe_size_in_mb[:-3] | int | round) | int > bigboot_size[:-1] | int
fail_msg: Not enough PE to expand /boot. fail_msg: Not enough PE to expand /boot.
rescue: rescue:

View File

@ -19,7 +19,7 @@
- name: Capture required expansion space - name: Capture required expansion space
ansible.builtin.set_fact: ansible.builtin.set_fact:
bigboot_expansion_diff: bigboot_expansion_diff:
"{{ bigboot_size | human_to_bytes - bigboot_boot_partsize | human_to_bytes }}" "{{ bigboot_size_target | human_to_bytes - bigboot_boot_partsize | human_to_bytes }}"
- name: Convert size difference to MB - name: Convert size difference to MB
ansible.builtin.set_fact: ansible.builtin.set_fact:
@ -27,7 +27,7 @@
- name: Set bigboot size 4k aligned - name: Set bigboot size 4k aligned
ansible.builtin.set_fact: ansible.builtin.set_fact:
bigboot_size_target: "{{ bigboot_size_expansion_mb[:-2] | int | get_block_size_up }}" bigboot_size: "{{ bigboot_size_expansion_mb[:-2] | int | get_block_size_up }}"
- name: Validate if we need to expand boot - name: Validate if we need to expand boot
block: block:
@ -43,4 +43,4 @@
rescue: rescue:
- name: Expansion of /boot required - name: Expansion of /boot required
ansible.builtin.debug: ansible.builtin.debug:
msg: "Will need to expand /boot by an additional {{ bigboot_size_target }}." msg: "Will need to expand /boot by an additional {{ bigboot_size }}."