<commit_before>---
- name: Install redis
  yum:
    name=redis
    state=latest

- name: Update kernel params
  sysctl:
    name: "{{ item.key }}"
    value: "{{ item.value }}"
    state: present
  ignore_errors: true
  with_dict: "{{ redis_sysctl_tweaks }}"

- name: Add service file for disabling Transparent Huge Pages
  copy:
    src: files/disable-transparent-hugepages
    dest: /etc/init.d/disable-transparent-hugepages
    mode: 0755

- name: Configure system to see this service
  command: chkconfig --add disable-transparent-hugepages

- name: Run service for disabling THP
  service:
    name: disable-transparent-hugepages
    state: started
    enabled: yes

- name: Tune redis tcp-backlog
  lineinfile:
    dest: /etc/redis.conf
    regexp: '^tcp-backlog \d+'
    line: 'tcp-backlog 65535'
  notify: restart redis

- name: Save pid to file
  lineinfile:
    dest: /usr/lib/systemd/system/redis.service
    insertafter: 'ExecStart='
    regexp: '^ExecStartPost='
    line: 'ExecStartPost=/bin/sh -c "echo $MAINPID > /var/run/redis/redis.pid"'
  notify: restart redis

- name: Run redis service
  service:
    name: redis
    state: started
    enabled: yes<commit_msg>Don't save PID file for redis<commit_after>---
- name: Install redis
  yum:
    name=redis
    state=latest

- name: Update kernel params
  sysctl:
    name: "{{ item.key }}"
    value: "{{ item.value }}"
    state: present
  ignore_errors: true
  with_dict: "{{ redis_sysctl_tweaks }}"

- name: Add service file for disabling Transparent Huge Pages
  copy:
    src: files/disable-transparent-hugepages
    dest: /etc/init.d/disable-transparent-hugepages
    mode: 0755

- name: Configure system to see this service
  command: chkconfig --add disable-transparent-hugepages

- name: Run service for disabling THP
  service:
    name: disable-transparent-hugepages
    state: started
    enabled: yes

- name: Tune redis tcp-backlog
  lineinfile:
    dest: /etc/redis.conf
    regexp: '^tcp-backlog \d+'
    line: 'tcp-backlog 65535'
  notify: restart redis
{'fraction_non_alphanumeric': 0.10854616895874264, 'fraction_numerical': 0.008840864440078585, 'mean_word_length': 3.1151515151515152, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3085059', 'n_tokens_mistral': 727, 'n_tokens_neox': 702, 'n_words': 192}