<commit_before>---
- name: add script to setup serviceaccount
  copy:
    src: "tmp/{{ item }}.sh"
    dest: "/tmp/{{ item }}.sh"
    owner: root
    mode: 0700
  with_items:
    - metrics_sa
    - monitoring_sa
    - fetch_token


- name: create fact directory
  file:
    path: /etc/ansible/facts.d
    state: directory

- name: create service account metrics
  command: /tmp/metrics_sa.sh
  register: command_result
  changed_when: "command_result.stdout.find('CHANGED') != -1"
  when: "'monitoring' in groups and inventory_hostname == masters[0]"

- name: create service account monitoring
  command: /tmp/monitoring_sa.sh
  register: command_result
  changed_when: "command_result.stdout.find('CHANGED') != -1"
  when: inventory_hostname == masters[0]<commit_msg>Fix master0 condition in service_accounts.yml<commit_after>---
- name: add script to setup serviceaccount
  copy:
    src: "tmp/{{ item }}.sh"
    dest: "/tmp/{{ item }}.sh"
    owner: root
    mode: 0700
  with_items:
    - metrics_sa
    - monitoring_sa
    - fetch_token


- name: create fact directory
  file:
    path: /etc/ansible/facts.d
    state: directory

- name: create service account metrics
  command: /tmp/metrics_sa.sh
  register: command_result
  changed_when: "command_result.stdout.find('CHANGED') != -1"
  when: "'monitoring' in groups and inventory_hostname == groups[\"masters\"][0]"

- name: create service account monitoring
  command: /tmp/monitoring_sa.sh
  register: command_result
  changed_when: "command_result.stdout.find('CHANGED') != -1"
  when: inventory_hostname == groups["masters"][0]
{'fraction_non_alphanumeric': 0.12641509433962264, 'fraction_numerical': 0.010691823899371069, 'mean_word_length': 3.57183908045977, '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': '5513244', 'n_tokens_mistral': 529, 'n_tokens_neox': 518, 'n_words': 137}