<commit_before>---
##
# Apache2 setup.
#

- name: Apache | Enable required Apache modules
  apache2_module: state=present name={{ item }}
  with_items:
    - proxy
    - proxy_http
    - rewrite
    - ssl
  sudo: yes


- name: Apache | Disable the default site
  action: command a2dissite 000-default
  ignore_errors: yes  
  tags: apache
      
- name: Apache | Configure Apache
  lineinfile:
    dest: "{{ apache_server_root }}/ports.conf"
    regexp: "{{ item.regexp }}"
    line: "{{ item.line }}"
    state: present
#    validate: '/usr/sbin/apache2ctl -f %s -t'
  with_items: apache_ports_configuration_items
  tags: apache
  notify:
    - apache restart      
      
- name: Apache | Compile Apache Jenkins configuration
  template: src=apache.conf.j2 dest=/etc/apache2/sites-available/jenkins.conf
  sudo: yes  
  tags: apache

- name: Apache | Enable our Jenkins site
  action: command a2ensite jenkins
  sudo: yes  
  tags: apache
  notify:
    - apache restart  <commit_msg>Sudo is required to modify port configuration too<commit_after>---
##
# Apache2 setup.
#

- name: Apache | Enable required Apache modules
  apache2_module: state=present name={{ item }}
  with_items:
    - proxy
    - proxy_http
    - rewrite
    - ssl
  sudo: yes


- name: Apache | Disable the default site
  action: command a2dissite 000-default
  ignore_errors: yes  
  tags: apache
      
- name: Apache | Configure Apache
  lineinfile:
    dest: "{{ apache_server_root }}/ports.conf"
    regexp: "{{ item.regexp }}"
    line: "{{ item.line }}"
    state: present
#    validate: '/usr/sbin/apache2ctl -f %s -t'
  with_items: apache_ports_configuration_items
  sudo: yes
  tags: apache
  notify:
    - apache restart      
      
- name: Apache | Compile Apache Jenkins configuration
  template: src=apache.conf.j2 dest=/etc/apache2/sites-available/jenkins.conf
  sudo: yes  
  tags: apache

- name: Apache | Enable our Jenkins site
  action: command a2ensite jenkins
  sudo: yes  
  tags: apache
  notify:
    - apache restart
{'fraction_non_alphanumeric': 0.10168650793650794, 'fraction_numerical': 0.00992063492063492, 'mean_word_length': 2.849236641221374, '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': '5853869', 'n_tokens_mistral': 694, 'n_tokens_neox': 650, 'n_words': 189}