<commit_before>---
- name: install packages
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - apache2
    - apache2-utils

- name: install module packages
  apt:
    name: "{{ item }}"
    state: present
  with_items: "{{ apache_apt_install }}"

- name: enable apache mods
  file:
    src: "/etc/apache2/mods-available/{{ item }}"
    dest: "/etc/apache2/mods-enabled/{{ item }}"
    state: link
  with_items: "{{ apache_mods_enabled }}"
  notify: restart apache

- name: disable apache mods
  file:
    path: "/etc/apache2/mods-enabled/{{ item }}"
    state: absent
  with_items: "{{ apache_mods_disabled }}"
  notify: restart apache

- name: stub ports file
  copy:
    src: ports.conf
    dest: /etc/apache2/ports.conf
    mode: 0644
    owner: root
    group: root
  notify: restart apache

- name: set-up ssl if any vhosts require it
  include: ssl.yml
  when:  "{{ apache_vhosts | selectattr('ssl', 'defined') | map(attribute='ssl') | sum }}"

- name: set-up apache vhosts
  include: vhosts.yml

- meta: flush_handlers

- name: start apache
  service:
    name: apache2
    state: started
    enabled: yes<commit_msg>Remove the default welcome page<commit_after>---
- name: install packages
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - apache2
    - apache2-utils

- name: install module packages
  apt:
    name: "{{ item }}"
    state: present
  with_items: "{{ apache_apt_install }}"

- name: enable apache mods
  file:
    src: "/etc/apache2/mods-available/{{ item }}"
    dest: "/etc/apache2/mods-enabled/{{ item }}"
    state: link
  with_items: "{{ apache_mods_enabled }}"
  notify: restart apache

- name: disable apache mods
  file:
    path: "/etc/apache2/mods-enabled/{{ item }}"
    state: absent
  with_items: "{{ apache_mods_disabled }}"
  notify: restart apache

- name: stub ports file
  copy:
    src: ports.conf
    dest: /etc/apache2/ports.conf
    mode: 0644
    owner: root
    group: root
  notify: restart apache

- name: Remove ubuntu's default welcome page
  file:
    path: /var/www/html/index.html
    state: absent

- name: set-up ssl if any vhosts require it
  include: ssl.yml
  when:  "{{ apache_vhosts | selectattr('ssl', 'defined') | map(attribute='ssl') | sum }}"

- name: set-up apache vhosts
  include: vhosts.yml

- meta: flush_handlers

- name: start apache
  service:
    name: apache2
    state: started
    enabled: yes
{'fraction_non_alphanumeric': 0.13158987131589872, 'fraction_numerical': 0.0091324200913242, 'mean_word_length': 2.899676375404531, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '944517', 'n_tokens_mistral': 874, 'n_tokens_neox': 824, 'n_words': 230}