Refactored for idempotency
This commit is contained in:
parent
e75578352f
commit
716698202d
@ -34,12 +34,22 @@
|
|||||||
success_msg: The /boot partition is already at the desired size
|
success_msg: The /boot partition is already at the desired size
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: "End host if /boot is already at or above {{ bigboot_size_min }}"
|
- name: "Check if boot is already at or above {{ bigboot_size_min }}"
|
||||||
ansible.builtin.fail:
|
block:
|
||||||
msg: "/boot partition size is already at least {{ bigboot_size_min }} or greater. Nothing to do."
|
- name: "Assert that /boot is already at or above {{ bigboot_size_min }}"
|
||||||
when:
|
ansible.builtin.assert:
|
||||||
- bigboot_boot_partsize | human_to_bytes > bigboot_size_min | int
|
that: bigboot_boot_partsize | human_to_bytes < bigboot_size_min | int
|
||||||
|
success_msg: >
|
||||||
|
/boot partition size is already at least {{ bigboot_size_min }}
|
||||||
|
or greater. Nothing to do."
|
||||||
|
fail_msg: >
|
||||||
|
/boot partition size is less than {{ bigboot_size_min }}.
|
||||||
|
Expansion of /boot is required.
|
||||||
|
|
||||||
|
- name: End play for host
|
||||||
|
ansible.builtin.meta: end_host
|
||||||
|
|
||||||
|
rescue:
|
||||||
- name: Set flag for Bigboot execution
|
- name: Set flag for Bigboot execution
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
bigboot_execute_bigboot: true
|
bigboot_execute_bigboot: true
|
||||||
@ -47,6 +57,5 @@
|
|||||||
- name: Expansion of /boot required
|
- name: Expansion of /boot required
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: >
|
msg: >
|
||||||
Expansion of /boot is required.
|
|
||||||
Will attempt to increase to {{ bigboot_size_target }}, or
|
Will attempt to increase to {{ bigboot_size_target }}, or
|
||||||
{{ bigboot_size_min }} at the minimum."
|
{{ bigboot_size_min }} at the minimum."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user