<commit_before>---

- name: Deploying SM engine code to the slaves
  hosts: slave
  user: ubuntu
  gather_facts: false

  tasks:
    - include: ../../deploy_tasks/engine.yml
  tags: [slave]


- name: Deploying SM engine code to the master
  hosts: master
  user: ubuntu
  gather_facts: true

  vars_files:
    - ../../vars/engine.yml

  tasks:
    - include: ../../deploy_tasks/engine.yml

    - name: Pull SM config from the remote host
      fetch: src={{ sm_home }}/conf/config.json.template dest=/tmp/config.json.template
             flat=yes fail_on_missing=yes

    - name: "Put SM config to {{ sm_home }}/conf/config.json"
      template: src=/tmp/config.json.template dest={{ sm_home }}/conf/config.json
                owner={{ spark_user }} group={{ spark_user }} mode=0600

    - include: ../../restart_supervisor.yml supervisor_app=sm-daemon
  tags: [master]<commit_msg>deploy/engine.yml - clean old logs (to avoid issues with filebeat)<commit_after>---

- name: Deploying SM engine code to the slaves
  hosts: slave
  user: ubuntu
  gather_facts: false

  tasks:
    - include: ../../deploy_tasks/engine.yml
  tags: [slave]


- name: Deploying SM engine code to the master
  hosts: master
  user: ubuntu
  gather_facts: true

  vars_files:
    - ../../vars/engine.yml

  tasks:
    - include: ../../deploy_tasks/engine.yml

    - name: Pull SM config from the remote host
      fetch: src={{ sm_home }}/conf/config.json.template dest=/tmp/config.json.template
             flat=yes fail_on_missing=yes

    - name: "Put SM config to {{ sm_home }}/conf/config.json"
      template: src=/tmp/config.json.template dest={{ sm_home }}/conf/config.json
                owner={{ spark_user }} group={{ spark_user }} mode=0600

    - name: Remove old logs
      file: path="{{ sm_home }}/logs" state=absent

    - name: Create folder for logs
      file: path="{{ sm_home }}/logs" state=directory

    - include: ../../restart_supervisor.yml supervisor_app=sm-daemon
  tags: [master]
{'fraction_non_alphanumeric': 0.13524384112619406, 'fraction_numerical': 0.004022121669180492, 'mean_word_length': 2.6446886446886446, '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': '4784064', 'n_tokens_mistral': 670, 'n_tokens_neox': 618, 'n_words': 178}