<commit_before>---
- hosts: 192.168.7.2
  remote_user: ubuntu
  become: true

  vars:
    distro: trusty

  vars_files:
    - wpa-conf.yml
    - local.yml

  tasks:

    # set the timezone if one is provided in this invocation
    - name: set timezone - area
      debconf: name=tzdata question=tzdata/Areas value={{ timezone.split("/")[0] }} vtype=string
      when: timezone|string != "None"
    - name: set timezone - zone
      debconf: name=tzdata question=tzdata/Zones/{{ timezone.split("/")[0] }} value={{ timezone.split("/")[1] }} vtype=string
      when: timezone|string != "None"

    # set the hostname if one if provided in this invocation
    - name: set hostname
      hostname: name={{ new_hostname }}
      when: new_hostname is defined

    # fix the network interface settings so that they work when plugged
    #
    # (1) no auto or hotplug for ethN - ifplugd will manage this
    - name: comment out auto directives for ethN interfaces
      replace:
        dest: /etc/network/interfaces
        regexp: '^(auto|allow-hotplug)(\s+eth[0-9].*)$'
        replace: '#\1\2'
    #<commit_msg>Rewrites timezone setting.<commit_after>---
- hosts: 192.168.7.2
  remote_user: ubuntu
  become: true

  vars:
    distro: trusty

  vars_files:
    - wpa-conf.yml
    - local.yml

  tasks:

    # set the local timezone if one is provided in this invocation
    - name: set local timezone
      copy: dest=/etc/timezone content="{{ timezone }}\n" group=root owner=root mode=0644
      when: timezone|string != "None"
      register: tzset
    - name: reconfigure for new local timezone
      shell: dpkg-reconfigure -f noninteractive tzdata
      when: tzset is defined and tzset.changed

    # set the hostname if one if provided in this invocation
    - name: set hostname
      hostname: name={{ new_hostname }}
      when: new_hostname is defined

    # fix the network interface settings so that they work when plugged
    #
    # (1) no auto or hotplug for ethN - ifplugd will manage this
    - name: comment out auto directives for ethN interfaces
      replace:
        dest: /etc/network/interfaces
        regexp: '^(auto|allow-hotplug)(\s+eth[0-9].*)$'
        replace: '#\1\2'
    #
{'fraction_non_alphanumeric': 0.10944595821980019, 'fraction_numerical': 0.014986376021798364, 'mean_word_length': 2.629324546952224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2037591', 'n_tokens_mistral': 731, 'n_tokens_neox': 687, 'n_words': 226}