<commit_before>---
- name: Assert platform is supported
  tags: etckeeper
  assert:
    that:
      - ansible_os_family in ['Debian']

- name: Assert etckeeper_vcs is valid
  tags: etckeeper
  assert:
    that:
      - etckeeper_vcs in ['git', 'hg', 'bzr', 'darcs']


- include_vars: "{{ ansible_os_family }}.yml"
  tags: etckeeper


- name: Update apt package cache
  tags: etckeeper
  when: ansible_os_family == 'Debian'
  apt:
    update_cache=yes
    cache_valid_time=3600

- name: Install Git
  tags: etckeeper
  apt:
    state=installed
    name=git
  when: etckeeper_vcs == 'git'

- name: Install Mercurial
  tags: etckeeper
  apt:
    state=installed
    name=mercurial
  when: etckeeper_vcs == 'hg'

- name: Install Bazaar
  tags: etckeeper
  apt:
    state=installed
    name=brz
  when: etckeeper_vcs == 'brz'

- name: Install Darcs
  tags: etckeeper
  apt:
    state=installed
    name=darcs
  when: etckeeper_vcs == 'darcs'


# Install the configuration first.
#   This ensures initialization of etckeeper uses the configured values.
- name: Install etckeeper configuration directory
  tags: etckeeper
  file:
    state=directory
    mode=0755
    owner=root
    group=root
    dest=/etc/etckeeper

- name: Install etckeeper configuration
  tags: etckeeper
  template:
    src=etckeeper.j2<commit_msg>Implement Silpion internal Style Guide<commit_after>---
- name: Assert platform is supported
  tags: etckeeper
  assert:
    that:
      - ansible_os_family in ['Debian']

- name: Assert etckeeper_vcs is valid
  tags: etckeeper
  assert:
    that:
      - etckeeper_vcs in ['git', 'hg', 'bzr', 'darcs']


- include_vars: "{{ ansible_os_family }}.yml"
  tags: etckeeper


- name: Update apt package cache
  tags: etckeeper
  when: ansible_os_family == 'Debian'
  apt:
    update_cache=yes
    cache_valid_time=3600

- name: Install Git
  tags: etckeeper
  when: etckeeper_vcs == 'git'
  apt:
    state=installed
    name=git

- name: Install Mercurial
  tags: etckeeper
  when: etckeeper_vcs == 'hg'
  apt:
    state=installed
    name=mercurial

- name: Install Bazaar
  tags: etckeeper
  when: etckeeper_vcs == 'brz'
  apt:
    state=installed
    name=brz

- name: Install Darcs
  tags: etckeeper
  when: etckeeper_vcs == 'darcs'
  apt:
    state=installed
    name=darcs


# Install the configuration first.
#   This ensures initialization of etckeeper uses the configured values.
- name: Install etckeeper configuration directory
  tags: etckeeper
  file:
    state=directory
    mode=0755
    owner=root
    group=root
    dest=/etc/etckeeper

- name: Install etckeeper configuration
  tags: etckeeper
  template:
    src=etckeeper.j2
{'fraction_non_alphanumeric': 0.09121748963437618, 'fraction_numerical': 0.006784771956275914, 'mean_word_length': 3.2464, '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': '2918630', 'n_tokens_mistral': 927, 'n_tokens_neox': 895, 'n_words': 251}