<commit_before>- set_fact: hs_dir=/var/lib//tor/hidden_service_www_{{ website_domain }}

- blockinfile: 
    dest: /etc/tor/torrc
    block: |
      HiddenServiceDir {{ hs_dir }}
      HiddenServicePort 443 127.0.0.1:443
      HiddenServicePort 80 127.0.0.1:80 
    notify: restart tor

- meta: flush_handlers

- shell: cat {{ hs_dir }}/hostname
  register: onion_hostname
  changed_when: False
  
- copy: dest=/etc/httpd/conf.d/{{ website_domain }}.conf.d/hidden_service.conf content="ServerAlias {{ onion_hostname }}"
  notify: verify config and restart httpd
<commit_msg>Fix trailling whitespace<commit_after>- set_fact: hs_dir=/var/lib//tor/hidden_service_www_{{ website_domain }}

- blockinfile:
    dest: /etc/tor/torrc
    block: |
      HiddenServiceDir {{ hs_dir }}
      HiddenServicePort 443 127.0.0.1:443
      HiddenServicePort 80 127.0.0.1:80
    notify: restart tor

- meta: flush_handlers

- shell: cat {{ hs_dir }}/hostname
  register: onion_hostname
  changed_when: False

- copy: dest=/etc/httpd/conf.d/{{ website_domain }}.conf.d/hidden_service.conf content="ServerAlias {{ onion_hostname }}"
  notify: verify config and restart httpd

{'fraction_non_alphanumeric': 0.12294372294372294, 'fraction_numerical': 0.0380952380952381, 'mean_word_length': 3.642570281124498, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 4, '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': '629523', 'n_tokens_mistral': 438, 'n_tokens_neox': 389, 'n_words': 84}