diff --git a/group_vars/osds.sample b/group_vars/osds.sample index 23713d101..88d1b6b62 100644 --- a/group_vars/osds.sample +++ b/group_vars/osds.sample @@ -134,6 +134,7 @@ dummy: # - /dev/sdf # - /dev/sdg # - /dev/sdg +#raw_journal_devices: [] # III. Use directory instead of disk for OSDs diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index a39814514..a4757f9e8 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -126,6 +126,7 @@ raw_multi_journal: false # - /dev/sdf # - /dev/sdg # - /dev/sdg +raw_journal_devices: [] # III. Use directory instead of disk for OSDs diff --git a/roles/ceph-osd/tasks/check_devices.yml b/roles/ceph-osd/tasks/check_devices.yml index 541aa7436..547cd295e 100644 --- a/roles/ceph-osd/tasks/check_devices.yml +++ b/roles/ceph-osd/tasks/check_devices.yml @@ -22,7 +22,7 @@ - name: check the partition status of the journal devices shell: "parted --script {{ item }} print > /dev/null 2>&1" - with_items: "{{ raw_journal_devices|default([])|unique }}" + with_items: "{{ raw_journal_devices|unique }}" changed_when: false failed_when: false register: journal_partition_status @@ -32,7 +32,7 @@ shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}" with_together: - "{{ journal_partition_status.results }}" - - "{{ raw_journal_devices|default([])|unique }}" + - "{{ raw_journal_devices|unique }}" changed_when: false when: - raw_multi_journal