<commit_before>include:
  - mysql_server.install

mysql_start:
  cmd:
    - run
    {% if 'cluster-id' in grains -%}
      {%-  for servername,clusterid  in salt ['mine.get']('G@cluster-id:mysql* and G@role:mysql', 'serverid','compound').items() -%}
       {%- if servername == grains['id'] and grains['mysql-is-master'] == True %}
    - name: service mysql start --wsrep-new-cluster
         {%- elif  servername == grains['id'] and grains['mysql-is-master'] == False %}
    - name: service mysql start
         {%- endif -%}
       {%-  endfor -%}
    {%- else %}
    - name: service mysql start
    {%- endif %}
    - require:
      - pkg: mysql_install
<commit_msg>now read grains.items<commit_after>{#include:
  - mysql_server.install
#}

mysql_start:
  cmd:
    - run
{%- if 'cluster-id' in grains -%}
{%-   for key, value in salt ['mine.get']('G@cluster-id:' + grains['cluster-id'] + ' and G@role:mysql', 'grains.items','compound').items() -%}
{%-     if value.id == grains['id'] and grains['mysql-is-master'] == True %}
    - name: service mysql start --wsrep-new-cluster
{%-     elif  value.id == grains['id'] and grains['mysql-is-master'] == False %}
    - name: service mysql start
{%-     endif -%}
{%-   endfor -%}
{%- else %}
    - name: service mysql start
{%- endif %}
{#    - require:
      - pkg: mysql_install
#}

{'fraction_non_alphanumeric': 0.19894894894894896, 'fraction_numerical': 0.0, 'mean_word_length': 2.672176308539945, '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': '5696764', 'n_tokens_mistral': 494, 'n_tokens_neox': 453, 'n_words': 102}