<commit_before>---
- package:
    name: "{{ item }}"
    state: present
  with_items:
  - mod_security
  - mod_security_crs
  notify: verify config and restart httpd
  name: Install mod_security packages

- lineinfile:
    dest: /etc/httpd/conf.d/mod_security.conf
    regexp: "^(\\s*)SecRuleEngine "
    line: "\\1SecRuleEngine {{ 'DetectionOnly' if mod_sec_detection_only else 'On' }}"
  notify: verify config and restart httpd
  name: Deploy modsecurity in apache
<commit_msg>Fix regexp and backref for mod_security<commit_after>---
- package:
    name: "{{ item }}"
    state: present
  with_items:
  - mod_security
  - mod_security_crs
  notify: verify config and restart httpd
  name: Install mod_security packages

- lineinfile:
    dest: /etc/httpd/conf.d/mod_security.conf
    regexp: '^(\s*)SecRuleEngine '
    line: "\\1SecRuleEngine {{ 'DetectionOnly' if mod_sec_detection_only else 'On' }}"
    backrefs: yes
  notify: verify config and restart httpd
  name: Deploy modsecurity in apache

{'fraction_non_alphanumeric': 0.10789210789210789, 'fraction_numerical': 0.001998001998001998, 'mean_word_length': 3.6175115207373274, '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': '775244', 'n_tokens_mistral': 338, 'n_tokens_neox': 329, 'n_words': 91}