<commit_before>---
- name: Install InfluxDB
  apt:
    name: influxdb
    state: present
    update_cache: true

- name: Install Python tools
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - python-requests
    - python-influxdb

- name: Prepare data directory
  file:
    path: "{{ influxdb_data_dir }}"
    state: directory
    owner: influxdb
    group: influxdb
    mode: '0755'

- name: Write InfluxDB configuration
  template:
    src: influxdb.conf
    dest: "/etc/influxdb/influxdb.conf"
    owner: root
    group: root
    mode: '0644'
  notify:
    - Restart influxdb

- name: Start InfluxDB
  service:
    name: influxdb
    state: started

- name: Create database
  influxdb_database:
    database_name: merkledb<commit_msg>Need to force-restart influx to pick up new data dir.<commit_after>---
- name: Install InfluxDB
  apt:
    name: influxdb
    state: present
    update_cache: true

- name: Install Python tools
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - python-requests
    - python-influxdb

- name: Prepare data directory
  file:
    path: "{{ influxdb_data_dir }}"
    state: directory
    owner: influxdb
    group: influxdb
    mode: '0755'

- name: Write InfluxDB configuration
  template:
    src: influxdb.conf
    dest: "/etc/influxdb/influxdb.conf"
    owner: root
    group: root
    mode: '0644'
  notify:
    - Restart influxdb

- name: Start InfluxDB
  service:
    name: influxdb
    state: restarted

- name: Create database
  influxdb_database:
    database_name: merkledb
{'fraction_non_alphanumeric': 0.09395109395109395, 'fraction_numerical': 0.010296010296010296, 'mean_word_length': 2.667452830188679, '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': '2131044', 'n_tokens_mistral': 551, 'n_tokens_neox': 521, 'n_words': 148}