- devices
changed_when: false
when:
- (journal_collocation or raw_multi_journal) and not
- osd_auto_discovery and
- item.0.rc != 0
+ - journal_collocation or raw_multi_journal
+ - not osd_auto_discovery
+ - item.0.rc != 0
- name: fix partitions gpt header or labels of the osd disks (autodiscover disks)
- shell: sgdisk --zap-all --clear --mbrtogpt -g -- "/dev/{{ item.1.key }}"
+ shell: "sgdisk --zap-all --clear --mbrtogpt -g -- '/dev/{{ item.1.key }}' || sgdisk --zap-all --clear --mbrtogpt -g -- '/dev/{{ item.1.key }}'"
with_together:
- combined_osd_partition_status_results.results
- ansible_devices
changed_when: false
when:
- journal_collocation and
- osd_auto_discovery and
- ansible_devices is defined and
- item.value.removable == "0" and
- item.value.partitions|count == 0 and
- item.0.rc != 0
+ - journal_collocation
+ - osd_auto_discovery
+ - ansible_devices is defined
+ - item.value.removable == "0"
+ - item.value.partitions|count == 0
+ - item.0.rc != 0
- name: fix partitions gpt header or labels of the journal devices
- shell: sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }}
+ shell: "sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }} || shell: sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }}"
with_together:
- journal_partition_status.results
- raw_journal_devices