<commit_before>---
- name: Install Node, NPM and nginx
  apt: name={{item}} state=installed
  with_items:
       - nodejs-legacy
       - npm
       - nginx-light
- name: Locally install dependencies
  local_action: command npm install
  args:
    chdir: ../api
  become: false
- name: Sync ipfs-search api
  synchronize: src=../../../api/ dest=/usr/local/libexec/ipfs-search-api times=yes partial=yes archive=no recursive=yes
  notify: restart ipfs-search
- name: Create ipfs-search group.
  group: name=ipfs-search system=true state=present
- name: Create ipfs-search user.
  user: name=ipfs-search comment="ipfs-search api" group=ipfs-search system=true state=present home=/nonexistent shell=/usr/sbin/nologin
- name: Install ipfs-search service
  copy: src=ipfs-search.service dest=/etc/systemd/system/ipfs-search.service
  notify: restart ipfs-search
- name: Enable search service
  service: name=ipfs-search enabled=yes state=started
- name: Install nginx configuration<commit_msg>Make sure destination directory exists.<commit_after>---
- name: Install Node, NPM and nginx
  apt: name={{item}} state=installed
  with_items:
       - nodejs-legacy
       - npm
       - nginx-light
- name: Locally install dependencies
  local_action: command npm install
  args:
    chdir: ../api
  become: false
- name: Create destination folder for search api
  file: path=/usr/local/libexec/ipfs-search-api state=directory
- name: Sync ipfs-search api
  synchronize: src=../../../api/ dest=/usr/local/libexec/ipfs-search-api times=yes partial=yes archive=no recursive=yes
  notify: restart ipfs-search
- name: Create ipfs-search group.
  group: name=ipfs-search system=true state=present
- name: Create ipfs-search user.
  user: name=ipfs-search comment="ipfs-search api" group=ipfs-search system=true state=present home=/nonexistent shell=/usr/sbin/nologin
- name: Install ipfs-search service
  copy: src=ipfs-search.service dest=/etc/systemd/system/ipfs-search.service
  notify: restart ipfs-search
- name: Enable search service
  service: name=ipfs-search enabled=yes state=started
- name: Install nginx configuration
{'fraction_non_alphanumeric': 0.11358258400378608, 'fraction_numerical': 0.0, 'mean_word_length': 3.8935185185185186, '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': '4653475', 'n_tokens_mistral': 680, 'n_tokens_neox': 658, 'n_words': 181}