fix(partitioning): add failed_when to all blkid commands to catch empty UUIDs
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
ansible.builtin.command: "blkid -s UUID -o value {{ item.partition }}"
|
||||
register: partitioning_extra_disk_uuids
|
||||
changed_when: false
|
||||
failed_when: partitioning_extra_disk_uuids.rc != 0 or (partitioning_extra_disk_uuids.stdout | trim | length) == 0
|
||||
loop: "{{ partitioning_extra_disks }}"
|
||||
loop_control:
|
||||
label: "{{ item.partition }}"
|
||||
|
||||
@@ -459,6 +459,7 @@
|
||||
ansible.builtin.command: blkid -s UUID -o value '{{ install_drive }}{{ partitioning_boot_partition_suffix }}'
|
||||
register: partitioning_boot_uuid
|
||||
changed_when: false
|
||||
failed_when: partitioning_boot_uuid.rc != 0 or (partitioning_boot_uuid.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for /boot filesystem
|
||||
when: partitioning_separate_boot | bool
|
||||
@@ -466,17 +467,20 @@
|
||||
blkid -s UUID -o value '{{ install_drive }}{{ partitioning_boot_fs_partition_suffix }}'
|
||||
register: partitioning_boot_fs_uuid
|
||||
changed_when: false
|
||||
failed_when: partitioning_boot_fs_uuid.rc != 0 or (partitioning_boot_fs_uuid.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for main filesystem
|
||||
ansible.builtin.command: blkid -s UUID -o value '{{ partitioning_root_device }}'
|
||||
register: partitioning_main_uuid
|
||||
changed_when: false
|
||||
failed_when: partitioning_main_uuid.rc != 0 or (partitioning_main_uuid.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for LVM root filesystem
|
||||
when: system_cfg.filesystem != 'btrfs'
|
||||
ansible.builtin.command: blkid -s UUID -o value /dev/{{ partitioning_vg_name }}/root
|
||||
register: partitioning_uuid_root_result
|
||||
changed_when: false
|
||||
failed_when: partitioning_uuid_root_result.rc != 0 or (partitioning_uuid_root_result.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for LVM swap filesystem
|
||||
when:
|
||||
@@ -485,6 +489,7 @@
|
||||
ansible.builtin.command: blkid -s UUID -o value /dev/{{ partitioning_vg_name }}/swap
|
||||
register: partitioning_uuid_swap_result
|
||||
changed_when: false
|
||||
failed_when: partitioning_uuid_swap_result.rc != 0 or (partitioning_uuid_swap_result.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for LVM home filesystem
|
||||
when:
|
||||
@@ -493,6 +498,7 @@
|
||||
ansible.builtin.command: blkid -s UUID -o value /dev/{{ partitioning_vg_name }}/home
|
||||
register: partitioning_uuid_home_result
|
||||
changed_when: false
|
||||
failed_when: partitioning_uuid_home_result.rc != 0 or (partitioning_uuid_home_result.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for LVM var filesystem
|
||||
when:
|
||||
@@ -501,6 +507,7 @@
|
||||
ansible.builtin.command: blkid -s UUID -o value /dev/{{ partitioning_vg_name }}/var
|
||||
register: partitioning_uuid_var_result
|
||||
changed_when: false
|
||||
failed_when: partitioning_uuid_var_result.rc != 0 or (partitioning_uuid_var_result.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for LVM var_log filesystem
|
||||
when:
|
||||
@@ -509,6 +516,7 @@
|
||||
ansible.builtin.command: blkid -s UUID -o value /dev/{{ partitioning_vg_name }}/var_log
|
||||
register: partitioning_uuid_var_log_result
|
||||
changed_when: false
|
||||
failed_when: partitioning_uuid_var_log_result.rc != 0 or (partitioning_uuid_var_log_result.stdout | trim | length) == 0
|
||||
|
||||
- name: Get UUID for LVM var_log_audit filesystem
|
||||
when:
|
||||
@@ -517,6 +525,7 @@
|
||||
ansible.builtin.command: blkid -s UUID -o value /dev/{{ partitioning_vg_name }}/var_log_audit
|
||||
register: partitioning_uuid_var_log_audit_result
|
||||
changed_when: false
|
||||
failed_when: partitioning_uuid_var_log_audit_result.rc != 0 or (partitioning_uuid_var_log_audit_result.stdout | trim | length) == 0
|
||||
|
||||
- name: Assign UUIDs to Variables
|
||||
when: system_cfg.filesystem != 'btrfs'
|
||||
|
||||
Reference in New Issue
Block a user