shrink_lv/bigboot_setup_environment.yml
2024-07-19 23:53:58 -04:00

53 lines
1.6 KiB
YAML

---
- name: Capture boot and logical volume information
hosts: all
become: true
gather_facts: true
strategy: free
vars_files:
- bigboot_vars.yml
tasks:
- name: Cleanup from any previous executions
ansible.builtin.import_tasks: tasks/cleanup.yml
- name: Get the list of services on the host
ansible.builtin.service_facts:
- name: Disable Docker service due to incompatibility
ansible.builtin.service:
name: docker.service
state: stopped
enabled: false
when:
- "'docker.service' in ansible_facts['services']"
- 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_data: "{{ bigboot_data | default({}) |
combine({inventory_hostname:
{
'bigboot_execute_bigboot': bigboot_execute_bigboot,
'bigboot_execute_shrink_lv': bigboot_execute_shrink_lv,
'bigboot_adjacent_lvm_device': bigboot_adjacent_lvm_device,
'bigboot_lv_shrink_size': bigboot_lv_shrink_size | int,
'bigboot_size': bigboot_size
}
}) }}"
- name: Execute ReaR backup
ansible.builtin.include_tasks: bigboot_rear_backup.yml
when:
- not bigboot_rear_backup_skip | default(false) | bool
...