<commit_before>---
- name: set hostname
  hostname:
    name: "{{ploy_hostname}}"

- name: install runtime dependencies
  apt:
    name: "{{item}}"
    state: installed
  with_items:
    - avahi-daemon
    - python3.5
    - wpasupplicant
    - wireless-tools
    - supervisor
    - python3-venv
    - libffi-dev
    - libssl-dev
    - lighttpd

- name: configure network interfaces
  template:
    src: interfaces
    dest: /etc/network/interfaces
    owner: root
    mode: "0644"
  notify: restart wlan
  tags: wlan

- name: ensure document root
  file:
    dest: "{{frontend_document_root}}"
    owner: root
    group: root
    mode: "0755"
    state: directory
  tags: www

- name: configure lighttpd
  template:
    src: lighttpd.conf
    dest: /etc/lighttpd/lighttpd.conf
    owner: root
    group: root
    mode: "0644"
  notify: restart httpd
  tags: www

- name: configure frontend website
  template:
    src: nuimo_hub.conf
    dest: /etc/lighttpd/conf-available/nuimo_hub.conf
    owner: root
    group: root
    mode: "0644"
  notify: restart httpd
  tags: www

- name: enable frontend website
  file:  
    src: /etc/lighttpd/conf-available/nuimo_hub.conf
    dest: /etc/lighttpd/conf-enabled/nuimo_hub.conf
    owner: root
    group: root
    mode: "0755"
    state: link
  notify: restart httpd
  tags: www

- name: announce web UI via avahi
  template:
    src: hub_service.xml
    dest: /etc/avahi/services/hub.service
    owner: root
    mode: "0644"
  notify: restart avahi
  tags: avahi<commit_msg>Make sure the hostname is available for local commands (i.e. sudo)<commit_after>---
- name: set hostname
  hostname:
    name: "{{ploy_hostname}}"

- name: install runtime dependencies
  apt:
    name: "{{item}}"
    state: installed
  with_items:
    - avahi-daemon
    - python3.5
    - wpasupplicant
    - wireless-tools
    - supervisor
    - python3-venv
    - libffi-dev
    - libssl-dev
    - lighttpd

- name: configure network interfaces
  template:
    src: interfaces
    dest: /etc/network/interfaces
    owner: root
    mode: "0644"
  notify: restart wlan
  tags: wlan

- name: ensure document root
  file:
    dest: "{{frontend_document_root}}"
    owner: root
    group: root
    mode: "0755"
    state: directory
  tags: www

- name: configure lighttpd
  template:
    src: lighttpd.conf
    dest: /etc/lighttpd/lighttpd.conf
    owner: root
    group: root
    mode: "0644"
  notify: restart httpd
  tags: www

- name: configure frontend website
  template:
    src: nuimo_hub.conf
    dest: /etc/lighttpd/conf-available/nuimo_hub.conf
    owner: root
    group: root
    mode: "0644"
  notify: restart httpd
  tags: www

- name: enable frontend website
  file:  
    src: /etc/lighttpd/conf-available/nuimo_hub.conf
    dest: /etc/lighttpd/conf-enabled/nuimo_hub.conf
    owner: root
    group: root
    mode: "0755"
    state: link
  notify: restart httpd
  tags: www

- name: announce web UI via avahi
  template:
    src: hub_service.xml
    dest: /etc/avahi/services/hub.service
    owner: root
    mode: "0644"
  notify: restart avahi
  tags: avahi

- name: Make sure the hostname is available for local commands (i.e. sudo)
  lineinfile:
    dest: /etc/hosts
    state: present
    regexp: '{{ploy_hostname}}$'
    line: '127.0.0.1  {{ploy_hostname}}.local {{ploy_hostname}}'
  tags: avahi
{'fraction_non_alphanumeric': 0.10297208045631942, 'fraction_numerical': 0.018012608826178327, 'mean_word_length': 2.5827956989247314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 1, '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': '7546550', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1167, 'n_words': 318}