diff --git a/roles/ceph-osd/tasks/scenarios/collocated.yml b/roles/ceph-osd/tasks/scenarios/collocated.yml deleted file mode 100644 index e1a791336..000000000 --- a/roles/ceph-osd/tasks/scenarios/collocated.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -# use shell rather than docker module -# to ensure osd disk prepare finishes before -# starting the next task -- name: prepare ceph containerized osd disk collocated - command: | - {{ container_binary }} run --net=host \ - --pid=host \ - --privileged=true \ - --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.1 | regex_replace('/dev/', '') }} \ - -v /etc/ceph:/etc/ceph:z \ - -v /var/lib/ceph/:/var/lib/ceph/:z \ - -v /dev:/dev \ - -v /etc/localtime:/etc/localtime:ro \ - -e DEBUG=verbose \ - -e CLUSTER={{ cluster }} \ - -e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \ - -e OSD_DEVICE={{ item.1 }} \ - {{ docker_env_args }} \ - {{ ceph_osd_docker_prepare_env }} \ - {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} - with_together: - - "{{ parted_results.results | default([]) }}" - - "{{ devices }}" - when: - - not osd_auto_discovery - - containerized_deployment - - item.0.partitions|length == 0 - -- name: automatic prepare ceph containerized osd disk collocated - command: | - {{ container_binary }} run --net=host \ - --pid=host \ - --privileged=true \ - --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.split('/')[-1] }} \ - -v /etc/ceph:/etc/ceph:z \ - -v /var/lib/ceph/:/var/lib/ceph/:z \ - -v /dev:/dev \ - -v /etc/localtime:/etc/localtime:ro \ - -e DEBUG=verbose \ - -e CLUSTER={{ cluster }} \ - -e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \ - -e OSD_DEVICE={{ item }} \ - {{ docker_env_args }} \ - {{ ceph_osd_docker_prepare_env }} \ - {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} - with_items: "{{ devices }}" - when: - - osd_auto_discovery - - containerized_deployment - - devices is defined - -- name: manually prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) with collocated osd data and journal - command: "ceph-disk prepare {{ ceph_disk_cli_options }} {{ item.1 }}" - with_together: - - "{{ parted_results.results | default([]) }}" - - "{{ devices }}" - when: - - not containerized_deployment - - item.0.partitions|length == 0 \ No newline at end of file diff --git a/roles/ceph-osd/tasks/scenarios/non-collocated.yml b/roles/ceph-osd/tasks/scenarios/non-collocated.yml deleted file mode 100644 index 1490b9695..000000000 --- a/roles/ceph-osd/tasks/scenarios/non-collocated.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- -# use shell rather than docker module -# to ensure osd disk prepare finishes before -# starting the next task -- name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated - command: | - {{ container_binary }} run --net=host \ - --pid=host \ - --privileged=true \ - --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.1 | regex_replace('/dev/', '') }} \ - -v /etc/ceph:/etc/ceph:z \ - -v /var/lib/ceph/:/var/lib/ceph/:z \ - -v /dev:/dev \ - -v /etc/localtime:/etc/localtime:ro \ - -e DEBUG=verbose \ - -e CLUSTER={{ cluster }} \ - -e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \ - -e OSD_DEVICE={{ item.1 }} \ - -e OSD_JOURNAL={{ item.2 }} \ - {{ docker_env_args }} \ - {{ ceph_osd_docker_prepare_env }} \ - {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} - with_together: - - "{{ parted_results.results | default([]) }}" - - "{{ devices }}" - - "{{ dedicated_devices }}" - when: - - containerized_deployment - - osd_objectstore == 'filestore' - - item.0.partitions|length == 0 - -- name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated with a dedicated device for db and wal - command: | - {{ container_binary }} run --net=host \ - --pid=host \ - --privileged=true \ - --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.1 | regex_replace('/dev/', '') }} \ - -v /etc/ceph:/etc/ceph:z \ - -v /var/lib/ceph/:/var/lib/ceph/:z \ - -v /dev:/dev \ - -v /etc/localtime:/etc/localtime:ro \ - -e DEBUG=verbose \ - -e CLUSTER={{ cluster }} \ - -e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \ - -e OSD_DEVICE={{ item.1 }} \ - -e OSD_BLUESTORE_BLOCK_DB={{ item.2 }} \ - -e OSD_BLUESTORE_BLOCK_WAL={{ item.3 }} \ - {{ docker_env_args }} \ - {{ ceph_osd_docker_prepare_env }} \ - {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} - with_together: - - "{{ parted_results.results | default([]) }}" - - "{{ devices }}" - - "{{ dedicated_devices }}" - - "{{ bluestore_wal_devices }}" - when: - - containerized_deployment - - osd_objectstore == 'bluestore' - - item.0.partitions|length == 0 - -- name: prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) non-collocated - command: "ceph-disk prepare {{ ceph_disk_cli_options }} {{ item.1 }} {{ item.2 }}" - with_together: - - "{{ parted_results.results | default([]) }}" - - "{{ devices }}" - - "{{ dedicated_devices }}" - changed_when: false - when: - - osd_objectstore == 'filestore' - - not containerized_deployment - - item.0.partitions|length == 0 - -- name: manually prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) with a dedicated device for db - command: "ceph-disk prepare {{ ceph_disk_cli_options }} --block.db {{ item.1 }} {{ item.2 }}" - with_together: - - "{{ parted_results.results | default([]) }}" - - "{{ dedicated_devices }}" - - "{{ devices | unique }}" - when: - - osd_objectstore == 'bluestore' - - not containerized_deployment - - item.0.partitions|length == 0 - - bluestore_wal_devices|length == 0 - -- name: manually prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) with a dedicated device for db and wal - command: "ceph-disk prepare {{ ceph_disk_cli_options }} --block.db {{ item.1 }} --block.wal {{ item.2 }} {{ item.3 }}" - with_together: - - "{{ parted_results.results | default([]) }}" - - "{{ dedicated_devices }}" - - "{{ bluestore_wal_devices }}" - - "{{ devices | unique }}" - when: - - osd_objectstore == 'bluestore' - - not containerized_deployment - - item.0.partitions|length == 0 - - bluestore_wal_devices|length > 0 \ No newline at end of file