diff --git a/bigboot.yml b/bigboot_execute_resize.yml similarity index 53% rename from bigboot.yml rename to bigboot_execute_resize.yml index 79e3085..29ccd95 100644 --- a/bigboot.yml +++ b/bigboot_execute_resize.yml @@ -1,28 +1,4 @@ --- -- name: Capture boot and logical volume information - hosts: all - become: true - gather_facts: true - strategy: free - - vars: - bigboot_size_target: 1G - - - tasks: - - name: Capture boot device details - ansible.builtin.import_tasks: tasks/capture_boot_device_details.yml - - - name: Capture logical volume information - ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml - - -- name: Perform a ReaR backup if any disk modifications are to be made - ansible.builtin.import_playbook: rhc.rear.rear_backup - when: - - bigboot_execute_bigboot | bool - - - name: Perform logical volume and boot parition resizing as needed hosts: all become: true @@ -44,3 +20,5 @@ ansible.builtin.import_role: name: infra.lvm_snapshots.bigboot when: bigboot_execute_bigboot | bool + +... diff --git a/bigboot_rear_backup.yml b/bigboot_rear_backup.yml new file mode 100644 index 0000000..f7d5d2c --- /dev/null +++ b/bigboot_rear_backup.yml @@ -0,0 +1,15 @@ +--- +- name: Perform ReaR backup before the /boot expansion + hosts: all + become: true + gather_facts: true + strategy: free + + tasks: + - name: Perform a ReaR backup if any disk modifications are to be made + ansible.builtin.import_playbook: rhc.rear.rear_backup + when: + - bigboot_execute_bigboot | bool + - not bigboot_skip_rear_backup | bool + +... diff --git a/bigboot_setup_environment.yml b/bigboot_setup_environment.yml new file mode 100644 index 0000000..4521ce6 --- /dev/null +++ b/bigboot_setup_environment.yml @@ -0,0 +1,32 @@ +--- +- name: Capture boot and logical volume information + hosts: all + become: true + gather_facts: true + strategy: free + + vars: + bigboot_size_target: 1G + ansible_ssh_retries: 10 + + + tasks: + - name: Capture boot device details + ansible.builtin.import_tasks: tasks/capture_boot_device_details.yml + + - name: Capture logical volume information + ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml + + - name: Set environment for subsequent workflow nodes + ansible.builtin.set_stats: + data: + bigboot_execute_bigboot: "{{ bigboot_execute_bigboot }}" + bigboot_execute_shrink_lv: "{{ bigboot_execute_shrink_lv }}" + bigboot_adjacent_lvm_device: "{{ bigboot_adjacent_lvm_device | trim }}" + bigboot_lv_shrink_size: "{{ bigboot_lv_shrink_size | int }}" + bigboot_size: "{{ bigboot_size }}" + bigboot_skip_rear_backup: "{{ bigboot_skip_rear | default('false') }}" + per_host: false + aggregate: false + +...