# for SSD journals.
- include: ./check_devices_static.yml
- when: not osd_auto_discovery
+ when:
+ - not osd_auto_discovery
+ - not osd_directory
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./check_devices_auto.yml
- when: osd_auto_discovery
+ when:
+ - osd_auto_discovery
+ - not osd_directory
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
changed_when: false
failed_when: false
register: journal_partition_status
- when: raw_multi_journal
+ when: raw_multi_journal or dmcrypt_dedicated_journal
- name: fix partitions gpt header or labels of the journal devices
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
- "{{ raw_journal_devices|unique }}"
changed_when: false
when:
- - raw_multi_journal
+ - raw_multi_journal or dmcrypt_dedicated_journal
- item.0.rc != 0
failed_when: false
register: osd_partition_status_results
when:
- - journal_collocation or raw_multi_journal
- ansible_devices is defined
- item.value.removable == "0"
- item.value.partitions|count == 0
- "{{ ansible_devices }}"
changed_when: false
when:
- - journal_collocation
- ansible_devices is defined
- item.0.item.value.removable == "0"
- item.0.item.value.partitions|count == 0
changed_when: false
failed_when: false
register: osd_partition_status_results
- when:
- - journal_collocation or raw_multi_journal
# NOTE: The following calls to sgdisk are retried because sgdisk is known to
# fully wipe a device the first time around. There is no need to halt execution
- "{{ osd_partition_status_results.results }}"
- "{{ devices }}"
changed_when: false
- when:
- - journal_collocation or raw_multi_journal
- - item.0.rc != 0
+ when: item.0.rc != 0
- name: check if a partition named 'ceph' exists
shell: "parted --script {{ item }} print | egrep -sq '^ 1.*ceph'"