refactored
This commit is contained in:
parent
70dcc9d3f1
commit
1298d2b4e8
@ -6,40 +6,38 @@
|
|||||||
strategy: free
|
strategy: free
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
bigboot_size_target: 1G
|
bigboot_size_target: 2G
|
||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Capture boot device details
|
- name: Capture boot device details
|
||||||
ansible.builtin.import_tasks: tasks/capture_boot_device_details.yml
|
ansible.builtin.import_tasks: tasks/capture_boot_device_details.yml
|
||||||
|
|
||||||
- name: Shrink a logical volume for /boot expansion if needed
|
- name: Shrink a logical volume for /boot expansion if needed
|
||||||
ansible.builtin.import_tasks: tasks/bigboot_manage_lv-noop.yml
|
ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml
|
||||||
|
|
||||||
|
|
||||||
- name: Import hi playbook
|
- name: Import hi playbook
|
||||||
ansible.builtin.import_playbook: rhc.rear.hi
|
ansible.builtin.import_playbook: rhc.rear.hi
|
||||||
|
when: bigboot_execute_bigboot | bool
|
||||||
|
|
||||||
|
|
||||||
- name: Expand the /boot partition
|
- name: Execute logical volume and boot parition resizing
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
strategy: free
|
strategy: free
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Do we have bigboot_size
|
- name: Execute Shrink_LV
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "bigboot_size == {{ bigboot_size }}"
|
msg:
|
||||||
|
- "device: {{ bigboot_adjacent_lvm_device | trim }}"
|
||||||
- name: Do we have bigboot_adjacent_lvm_device
|
- "size : {{ bigboot_lv_shrink_size | int }}"
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: "bigboot_adjacent_lvm_device == {{ bigboot_adjacent_lvm_device }}"
|
|
||||||
|
|
||||||
- name: Execute Shrink_LV role to resize target logical volume
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: "Would have included infra.lvm_snapshots.shrink_lv here."
|
|
||||||
when: bigboot_execute_shrink_lv | bool
|
when: bigboot_execute_shrink_lv | bool
|
||||||
|
|
||||||
- name: Expand the /boot partition as requested
|
- name: Execute Bigboot as needed
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "Would have included infra.lvm_snapshots.bigboot here."
|
msg: "{{ bigboot_size }}"
|
||||||
|
when: bigboot_execute_bigboot | bool
|
||||||
|
|
||||||
|
@ -22,39 +22,23 @@
|
|||||||
when: bigboot_execute_bigboot | bool
|
when: bigboot_execute_bigboot | bool
|
||||||
|
|
||||||
|
|
||||||
- name: Execute logical volume and boot parition resizing
|
- name: Execute logical volume and boot parition resizing as needed
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
strategy: free
|
strategy: free
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Execute Shrink_LV
|
- name: Import Shrink_LV role to resize target logical volume
|
||||||
ansible.builtin.debug:
|
ansible.builtin.import_role:
|
||||||
msg:
|
name: infra.lvm_snapshots.shrink_lv
|
||||||
- "device: {{ bigboot_adjacent_lvm_device | trim }}"
|
vars:
|
||||||
- "size : {{ bigboot_lv_shrink_size | int }}"
|
shrink_lv_devices:
|
||||||
|
- device: "{{ bigboot_adjacent_lvm_device | trim }}"
|
||||||
|
size: "{{ bigboot_lv_shrink_size | int }}"
|
||||||
when: bigboot_execute_shrink_lv | bool
|
when: bigboot_execute_shrink_lv | bool
|
||||||
|
|
||||||
- name: Execute Bigboot as needed
|
- name: Expand the /boot partition as requested
|
||||||
ansible.builtin.debug:
|
ansible.builtin.include_role:
|
||||||
msg: "{{ bigboot_size }}"
|
name: infra.lvm_snapshots.bigboot
|
||||||
when: bigboot_execute_bigboot | bool
|
when: bigboot_execute_bigboot | bool
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# - name: Execute Shrink_LV/Bigboot as needed
|
|
||||||
# when: bigboot_expansion_diff | int <= 0
|
|
||||||
# block:
|
|
||||||
# - name: Execute Shrink_LV role to resize target logical volume
|
|
||||||
# ansible.builtin.import_role:
|
|
||||||
# name: infra.lvm_snapshots.shrink_lv
|
|
||||||
# vars:
|
|
||||||
# shrink_lv_devices:
|
|
||||||
# - device: "{{ bigboot_adjacent_lvm_device | trim }}"
|
|
||||||
# size: "{{ bigboot_lv_shrink_size | int }}"
|
|
||||||
# when: bigboot_execute_shrink_lv | bool
|
|
||||||
|
|
||||||
# - name: Expand the /boot partition as requested
|
|
||||||
# ansible.builtin.include_role:
|
|
||||||
# name: infra.lvm_snapshots.bigboot
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user