<commit_before>---
- name: set_fact docker_exec_cmd
  set_fact:
    docker_exec_cmd: "docker exec ceph-osd-{{ ansible_hostname }}"
  when:
    - containerized_deployment

- name: include check_mandatory_vars.yml
  include: check_mandatory_vars.yml

- name: include pre_requisite.yml
  include: pre_requisite.yml
  when:
    - not containerized_deployment
  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
  static: False

- name: include ceph_disk_cli_options_facts.yml
  include: ceph_disk_cli_options_facts.yml

- name: set_fact devices generate device list when osd_auto_discovery
  set_fact:
    devices: "{{ devices | default([]) + [ item.key | regex_replace('^', '/dev/') ] }}"
  with_dict: "{{ ansible_devices }}"
  when:
    - osd_auto_discovery
    - ansible_devices is defined
    - item.value.removable == "0"
    - item.value.partitions|count == 0
    - item.value.holders|count == 0
    - "'dm-' not in item.key"

- name: include check_devices.yml
  include: check_devices.yml
  when:
    - not osd_auto_discovery

- name: check if a partition named 'ceph' exists
  shell: "parted --script {{ item }} print | egrep -sq '^ 1.*ceph'"
  with_items:
    - "{{ devices }}"
  changed_when: false
  failed_when: false
  check_mode: no
  register: parted_results

- name: include copy_configs.yml
  include: copy_configs.yml
  when:
    - containerized_deployment
    - not containerized_deployment_with_kv

- name: include scenarios/collocated.yml
  include: scenarios/collocated.yml
  when:
    - osd_scenario == 'collocated'
  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
  static: False
<commit_msg>osd: avoid using non desired loop device in autodiscovery<commit_after>---
- name: set_fact docker_exec_cmd
  set_fact:
    docker_exec_cmd: "docker exec ceph-osd-{{ ansible_hostname }}"
  when:
    - containerized_deployment

- name: include check_mandatory_vars.yml
  include: check_mandatory_vars.yml

- name: include pre_requisite.yml
  include: pre_requisite.yml
  when:
    - not containerized_deployment
  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
  static: False

- name: include ceph_disk_cli_options_facts.yml
  include: ceph_disk_cli_options_facts.yml

- name: set_fact devices generate device list when osd_auto_discovery
  set_fact:
    devices: "{{ devices | default([]) + [ item.key | regex_replace('^', '/dev/') ] }}"
  with_dict: "{{ ansible_devices }}"
  when:
    - osd_auto_discovery
    - ansible_devices is defined
    - item.value.removable == "0"
    - item.value.sectors != "0"
    - item.value.partitions|count == 0
    - item.value.holders|count == 0
    - "'dm-' not in item.key"

- name: include check_devices.yml
  include: check_devices.yml
  when:
    - not osd_auto_discovery

- name: check if a partition named 'ceph' exists
  shell: "parted --script {{ item }} print | egrep -sq '^ 1.*ceph'"
  with_items:
    - "{{ devices }}"
  changed_when: false
  failed_when: false
  check_mode: no
  register: parted_results

- name: include copy_configs.yml
  include: copy_configs.yml
  when:
    - containerized_deployment
    - not containerized_deployment_with_kv

- name: include scenarios/collocated.yml
  include: scenarios/collocated.yml
  when:
    - osd_scenario == 'collocated'
  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
  static: False

{'fraction_non_alphanumeric': 0.10051107325383304, 'fraction_numerical': 0.002555366269165247, 'mean_word_length': 3.6477572559366753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4013916', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1146, 'n_words': 312}