<commit_before>---
- name: Install additional packages
  apt:
    name:
      - python3-bs4
      - python3-selenium
  tags: [enecoq, package]

- name: Clone enecoq.git
  git:
    repo: <EMAIL>:rewse/enecoq.git
    dest: /srv/git/enecoq
    accept_hostkey: yes
    key_file: /home/{{ admin }}/.ssh/id_rsa
  tags: [enecoq]

- name: Copy enecoq
  copy:
    src: /srv/git/enecoq/enecoq
    dest: /usr/local/bin/
    mode: 0755
    remote_src: yes
  tags: [enecoq]

- name: Copy enecoq.sh
  template:
    src: enecoq.sh.j2
    dest: /usr/lib/zabbix/agentscripts/enecoq.sh
    group: zabbix
    mode: 0750
    variable_start_string: "[%"
    variable_end_string: "%]"
  tags: [enecoq]

- name: Copy enecoq.conf
  copy:
    src: enecoq.conf
    dest: /etc/zabbix/zabbix_agentd.d
  notify: Restart zabbix-agent
  tags: [enecoq]<commit_msg>Change zabbix home directory<commit_after>---
- name: Install additional packages
  apt:
    name:
      - python3-bs4
      - python3-selenium
  tags: [enecoq, package]

- name: Clone enecoq.git
  git:
    repo: <EMAIL>:rewse/enecoq.git
    dest: /srv/git/enecoq
    accept_hostkey: yes
    key_file: /home/{{ admin }}/.ssh/id_rsa
  tags: [enecoq]

- name: Copy enecoq
  copy:
    src: /srv/git/enecoq/enecoq
    dest: /usr/local/bin/
    mode: 0755
    remote_src: yes
  tags: [enecoq]

- name: Copy enecoq.sh
  template:
    src: enecoq.sh.j2
    dest: /usr/lib/zabbix/agentscripts/enecoq.sh
    group: zabbix
    mode: 0750
    variable_start_string: "[%"
    variable_end_string: "%]"
  tags: [enecoq]

- name: Copy enecoq.conf
  copy:
    src: enecoq.conf
    dest: /etc/zabbix/zabbix_agentd.d
  notify: Restart zabbix-agent
  tags: [enecoq]

# Due to "selenium.common.exceptions.WebDriverException: Message: Service
# chromedriver unexpectedly exited. Status code was: 1"
- name: Change zabbix home directory
  user:
    name: zabbix
    home: /home/zabbix
  notify: Restart zabbix-agent
  tags: [enecoq]
{'fraction_non_alphanumeric': 0.1240349974266598, 'fraction_numerical': 0.012866700977869275, 'mean_word_length': 2.7312859884836853, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1332813', 'n_tokens_mistral': 850, 'n_tokens_neox': 821, 'n_words': 171}