with_items: "{{ devices }}"
register: devices_prepare_canonicalize
when:
- - devices | length > 0
+ - devices is defined
- inventory_hostname in groups.get(osd_group_name, [])
- not osd_auto_discovery|default(False)
devices: "{{ devices | default([]) + [ item.stdout ] }}"
with_items: "{{ devices_prepare_canonicalize.results }}"
when:
- - devices | length > 0
+ - devices is defined
- inventory_hostname in groups.get(osd_group_name, [])
- not osd_auto_discovery|default(False)
set_fact:
devices: "{{ devices | reject('search','/dev/disk') | list | unique }}"
when:
- - devices | length > 0
+ - devices is defined
- inventory_hostname in groups.get(osd_group_name, [])
- not osd_auto_discovery|default(False)
delegate_to: "{{ groups[mon_group_name][0] }}"
until:
- (wait_for_all_osds_up.stdout | default('{}') | from_json)["osdmap"]["osdmap"]["num_osds"] | int > 0
- - (wait_for_all_osds_up.stdout | default('{}') | from_json)["osdmap"]["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | default('{}') from_json)["osdmap"]["osdmap"]["num_up_osds"]
+ - (wait_for_all_osds_up.stdout | default('{}') | from_json)["osdmap"]["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | default('{}') | from_json)["osdmap"]["osdmap"]["num_up_osds"]
when:
- inventory_hostname == ansible_play_hosts_all | last
with_items: "{{ lvm_volumes | default(devices) }}"
when:
- inventory_hostname in groups.get(osd_group_name, [])
- - (item.data is defined and item.data_vg is undefined) or devices | length > 0
+ - (item.data is defined and item.data_vg is undefined) or devices is defined
- name: fail when gpt header found on osd devices
fail: