with_together:
- "{{ simple_scan.results }}"
- "{{ partlabel.results }}"
- when: item.1.stdout == 'ceph data'
+ when:
+ - item.1.stdout == 'ceph data'
+ - (item.0.stdout | from_json).encrypted | default(False) | bool
- name: ensure dmcrypt for data device is closed
command: cryptsetup close "{{ (item.0.stdout | from_json).data.uuid }}"
changed_when: false
when:
- item.1.stdout == 'ceph data'
- - (item.0.stdout | from_json).encrypted | default(False)
+ - (item.0.stdout | from_json).encrypted | default(False) | bool
- name: ensure dmcrypt for journal device is closed
command: cryptsetup close "{{ (item.0.stdout | from_json).journal.uuid }}"
changed_when: false
when:
- item.1.stdout == 'ceph data'
- - (item.0.stdout | from_json).encrypted | default(False)
+ - (item.0.stdout | from_json).encrypted | default(False) | bool
- name: zap data devices
command: "{{ container_run_cmd }} --cluster {{ cluster }} lvm zap --destroy {{ (item.0.stdout | from_json).data.path }}"
- name: remove gpt header
command: parted -s "{{ item }}" mklabel msdos
- with_items: "{{ devices + dedicated_devices | default([]) }}"
+ with_items: "{{ (devices + dedicated_devices + ceph_disk_osds_devices | default([])) | unique }}"
+
+ - name: refresh ansible devices fact
+ setup:
+ filter: ansible_devices
+ when: osd_auto_discovery | bool
- - import_role:
- name: ceph-facts
- import_role:
name: ceph-defaults
+ - import_role:
+ name: ceph-facts
- import_role:
name: ceph-handler
- import_role:
osd1 osd_objectstore=filestore lvm_volumes="[{'data': 'data-lv1', 'journal': '/dev/sdc1', 'data_vg': 'test_group'},{'data': 'data-lv2', 'data_vg': 'test_group', 'journal': 'journal1', 'journal_vg': 'journals'}]" dmcrypt=true
osd2 osd_objectstore=filestore devices="['/dev/sda', '/dev/sdb']" dedicated_devices="['/dev/sdc']" journal_size=1024
osd3 osd_objectstore=filestore lvm_volumes="[{'data': '/dev/sda', 'journal': '/dev/sdc1'},{'data': '/dev/sdb', 'journal': '/dev/sdc2'}]"
-osd4 osd_objectstore=filestore lvm_volumes="[{'data': '/dev/sda', 'journal': '/dev/sdc1'},{'data': '/dev/sdb', 'journal': '/dev/sdc2'}]" dmcrypt=true
\ No newline at end of file
+osd4 osd_objectstore=filestore lvm_volumes="[{'data': '/dev/sda', 'journal': '/dev/sdc1'},{'data': '/dev/sdb', 'journal': '/dev/sdc2'}]" dmcrypt=true
+osd5 osd_objectstore=filestore osd_auto_discovery=true journal_size=1024
\ No newline at end of file
# DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1
-osd_vms: 5
+osd_vms: 6
mds_vms: 0
rgw_vms: 0
nfs_vms: 0
osd1 osd_objectstore=filestore lvm_volumes="[{'data': 'data-lv1', 'journal': '/dev/sdc1', 'data_vg': 'test_group'},{'data': 'data-lv2', 'data_vg': 'test_group', 'journal': 'journal1', 'journal_vg': 'journals'}]" dmcrypt=true
osd2 osd_objectstore=filestore devices="['/dev/sda', '/dev/sdb']" dedicated_devices="['/dev/sdc']" journal_size=1024
osd3 osd_objectstore=filestore lvm_volumes="[{'data': '/dev/sda', 'journal': '/dev/sdc1'},{'data': '/dev/sdb', 'journal': '/dev/sdc2'}]"
-osd4 osd_objectstore=filestore lvm_volumes="[{'data': '/dev/sda', 'journal': '/dev/sdc1'},{'data': '/dev/sdb', 'journal': '/dev/sdc2'}]" dmcrypt=true
\ No newline at end of file
+osd4 osd_objectstore=filestore lvm_volumes="[{'data': '/dev/sda', 'journal': '/dev/sdc1'},{'data': '/dev/sdb', 'journal': '/dev/sdc2'}]" dmcrypt=true
+osd5 osd_objectstore=filestore osd_auto_discovery=true journal_size=1024
\ No newline at end of file
# DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1
-osd_vms: 5
+osd_vms: 6
mds_vms: 0
rgw_vms: 0
nfs_vms: 0