<commit_before>---
- name: "Add nodes to required groups"
  hosts: localhost
  connection: local
  gather_facts: False
  tasks:
    - name: "Add all cluster nodes to the kafka-nodes group"
      add_host:
        name: "{{ hostvars[item.1].inventory_hostname }}"
        id: "{{ item.0 + 1 }}"
        groups: kafka-nodes
      with_indexed_items: groups['kafka-nodes']|sort

- name: "Show debug info"
  hosts: kafka-nodes
  sudo: yes
  sudo_user: root
  tasks:
    - name: "Show Kafka nodes info"
      debug: var=hostvars[inventory_hostname]
      when: debug


- name: "Apply zookeeper and kafka roles to the Kafka cluster"
  hosts: kafka-nodes
  sudo: yes
  sudo_user: root
  roles:
    - kafka<commit_msg>Fix for the common role.<commit_after>---
- name: "Add nodes to required groups"
  hosts: localhost
  connection: local
  gather_facts: False
  tasks:
    - name: "Add all cluster nodes to the kafka-nodes group"
      add_host:
        name: "{{ hostvars[item.1].inventory_hostname }}"
        id: "{{ item.0 + 1 }}"
        groups: kafka-nodes
      with_indexed_items: groups['kafka-nodes']|sort

- name: "Show debug info"
  hosts: kafka-nodes
  sudo: yes
  sudo_user: root
  tasks:
    - name: "Show Kafka nodes info"
      debug: var=hostvars[inventory_hostname]
      when: debug

- name: "Apply the common role to all nodes"
  hosts: kafka-nodes
  sudo: yes
  sudo_user: root
  roles:
    - common

- name: "Apply zookeeper and kafka roles to the Kafka cluster"
  hosts: kafka-nodes
  sudo: yes
  sudo_user: root
  roles:
    - kafka
{'fraction_non_alphanumeric': 0.1065203357004519, 'fraction_numerical': 0.003873466752743706, 'mean_word_length': 2.7897310513447433, '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': '3350703', 'n_tokens_mistral': 538, 'n_tokens_neox': 529, 'n_words': 161}