Only import playbook if we need to; define defaults

This commit is contained in:
Chris Hammer 2025-05-27 16:09:26 -04:00
parent 87a8235cc0
commit 37d44db328

View File

@ -17,6 +17,8 @@
- name: Set logical volume information - name: Set logical volume information
ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml
when:
- bigboot_execute_bigboot | default(false) | bool
- name: Set environment for subsequent workflow nodes - name: Set environment for subsequent workflow nodes
ansible.builtin.set_stats: ansible.builtin.set_stats:
@ -26,11 +28,11 @@
combine({inventory_hostname: combine({inventory_hostname:
{ {
'bigboot_execute_bigboot': bigboot_execute_bigboot, 'bigboot_execute_bigboot': bigboot_execute_bigboot,
'bigboot_execute_shrink_lv': bigboot_execute_shrink_lv, 'bigboot_execute_shrink_lv': bigboot_execute_shrink_lv | default(false),
'bigboot_adjacent_lvm_device': bigboot_adjacent_lvm_device, 'bigboot_adjacent_lvm_device': bigboot_adjacent_lvm_device | default(omit),
'bigboot_lv_shrink_size': bigboot_lv_shrink_size | int, 'bigboot_lv_shrink_size': bigboot_lv_shrink_size | default(0) | int,
'bigboot_pv': bigboot_pv, 'bigboot_pv': bigboot_pv | default(omit),
'bigboot_size_target': bigboot_size_target_fallback, 'bigboot_size_target': bigboot_size_target_fallback | default(bigboot_size_target),
'ip_addresses': ansible_all_ipv4_addresses, 'ip_addresses': ansible_all_ipv4_addresses,
'server_hostname': ansible_hostname 'server_hostname': ansible_hostname
} }