mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #1024 from eduardegorov/egorove_make_devices_optional
Make {{ devices }} list optionalpull/1066/head
commit
899c8b309f
|
@ -368,7 +368,8 @@ dummy:
|
||||||
#bluestore: False
|
#bluestore: False
|
||||||
#dmcrypt_journal_collocation: False
|
#dmcrypt_journal_collocation: False
|
||||||
#dmcrypt_dedicated_journal: False
|
#dmcrypt_dedicated_journal: False
|
||||||
#raw_journal_devices: {}
|
#raw_journal_devices: []
|
||||||
|
#devices: []
|
||||||
|
|
||||||
#osd_auto_discovery: False
|
#osd_auto_discovery: False
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,8 @@ dummy:
|
||||||
# - /dev/sdd
|
# - /dev/sdd
|
||||||
# - /dev/sde
|
# - /dev/sde
|
||||||
|
|
||||||
|
#devices: []
|
||||||
|
|
||||||
|
|
||||||
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
||||||
# You can use this option with First and Forth and Fifth OSDS scenario.
|
# You can use this option with First and Forth and Fifth OSDS scenario.
|
||||||
|
@ -132,6 +134,7 @@ dummy:
|
||||||
# - /dev/sdf
|
# - /dev/sdf
|
||||||
# - /dev/sdg
|
# - /dev/sdg
|
||||||
# - /dev/sdg
|
# - /dev/sdg
|
||||||
|
#raw_journal_devices: []
|
||||||
|
|
||||||
|
|
||||||
# III. Use directory instead of disk for OSDs
|
# III. Use directory instead of disk for OSDs
|
||||||
|
|
|
@ -402,7 +402,7 @@
|
||||||
|
|
||||||
- name: zap osd disks
|
- name: zap osd disks
|
||||||
shell: ceph-disk zap "{{ item }}"
|
shell: ceph-disk zap "{{ item }}"
|
||||||
with_items: "{{ devices | default([]) }}"
|
with_items: "{{ devices }}"
|
||||||
when:
|
when:
|
||||||
ceph_disk_present.rc == 0 and
|
ceph_disk_present.rc == 0 and
|
||||||
ceph_data_partlabels.rc == 0 and
|
ceph_data_partlabels.rc == 0 and
|
||||||
|
|
|
@ -360,7 +360,8 @@ osd_directory: False
|
||||||
bluestore: False
|
bluestore: False
|
||||||
dmcrypt_journal_collocation: False
|
dmcrypt_journal_collocation: False
|
||||||
dmcrypt_dedicated_journal: False
|
dmcrypt_dedicated_journal: False
|
||||||
raw_journal_devices: {}
|
raw_journal_devices: []
|
||||||
|
devices: []
|
||||||
|
|
||||||
osd_auto_discovery: False
|
osd_auto_discovery: False
|
||||||
|
|
||||||
|
|
|
@ -106,17 +106,17 @@
|
||||||
- osd_group_name in group_names
|
- osd_group_name in group_names
|
||||||
- journal_collocation
|
- journal_collocation
|
||||||
- not osd_auto_discovery
|
- not osd_auto_discovery
|
||||||
- devices is not defined
|
- devices|length == 0
|
||||||
|
|
||||||
- name: verify journal devices have been provided
|
- name: verify journal devices have been provided
|
||||||
fail:
|
fail:
|
||||||
msg: "please provide devices to your osd scenario"
|
msg: "please provide devices and raw journal devices to your osd scenario"
|
||||||
when:
|
when:
|
||||||
- osd_group_name is defined
|
- osd_group_name is defined
|
||||||
- osd_group_name in group_names
|
- osd_group_name in group_names
|
||||||
- raw_multi_journal
|
- raw_multi_journal
|
||||||
- raw_journal_devices is not defined
|
- raw_journal_devices|length == 0
|
||||||
or devices is not defined
|
or devices|length == 0
|
||||||
|
|
||||||
- name: verify directories have been provided
|
- name: verify directories have been provided
|
||||||
fail:
|
fail:
|
||||||
|
|
|
@ -78,6 +78,8 @@ cephx: true
|
||||||
# - /dev/sdd
|
# - /dev/sdd
|
||||||
# - /dev/sde
|
# - /dev/sde
|
||||||
|
|
||||||
|
devices: []
|
||||||
|
|
||||||
|
|
||||||
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
||||||
# You can use this option with First and Forth and Fifth OSDS scenario.
|
# You can use this option with First and Forth and Fifth OSDS scenario.
|
||||||
|
@ -124,6 +126,7 @@ raw_multi_journal: false
|
||||||
# - /dev/sdf
|
# - /dev/sdf
|
||||||
# - /dev/sdg
|
# - /dev/sdg
|
||||||
# - /dev/sdg
|
# - /dev/sdg
|
||||||
|
raw_journal_devices: []
|
||||||
|
|
||||||
|
|
||||||
# III. Use directory instead of disk for OSDs
|
# III. Use directory instead of disk for OSDs
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
command: ceph-disk activate {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
command: ceph-disk activate {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ ispartition_results.results }}"
|
- "{{ ispartition_results.results }}"
|
||||||
- "{{ devices|default([])|unique }}"
|
- "{{ devices|unique }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: activate_osd_disk
|
register: activate_osd_disk
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
command: ceph-disk activate --dmcrypt {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
command: ceph-disk activate --dmcrypt {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ ispartition_results.results }}"
|
- "{{ ispartition_results.results }}"
|
||||||
- "{{ devices|default([])|unique }}"
|
- "{{ devices|unique }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: activate_osd_disk_dmcrypt
|
register: activate_osd_disk_dmcrypt
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
command: "ceph-disk activate {{ item.1 }}"
|
command: "ceph-disk activate {{ item.1 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ ispartition_results.results }}"
|
- "{{ ispartition_results.results }}"
|
||||||
- "{{ devices|default([])|unique }}"
|
- "{{ devices|unique }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
- name: check the partition status of the journal devices
|
- name: check the partition status of the journal devices
|
||||||
shell: "parted --script {{ item }} print > /dev/null 2>&1"
|
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
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: journal_partition_status
|
register: journal_partition_status
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ journal_partition_status.results }}"
|
- "{{ journal_partition_status.results }}"
|
||||||
- "{{ raw_journal_devices|default([])|unique }}"
|
- "{{ raw_journal_devices|unique }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- raw_multi_journal
|
- raw_multi_journal
|
||||||
|
|
Loading…
Reference in New Issue