<commit_before>---
- name: install ubuntu packages
  become: true
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - direnv
    - git
    - powerline
    - zsh
  tags:
    - zsh

- name: install Oh My ZSH!
  become: true
  shell: ZSH={{ zsh_global_oh_my_zsh_root }} sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  tags:
    - zsh

- name: direnv hook
  become: true
  copy:
    src: direnv.zsh
    dest: "{{ zsh_global_oh_my_zsh_root }}/custom/direnv.sh"
    owner: root
    group: root
    mode: "644"
  tags:
    - zsh

- name: install powerlevel9k theme
  become: true
  git:
    repo: https://github.com/bhilburn/powerlevel9k.git
    dest: "{{ zsh_global_oh_my_zsh_root }}/custom/themes/powerlevel9k"
  tags:
    - zsh

- name: install syntax highlighting plugin
  become: true
  git:
    repo: git://github.com/zsh-users/zsh-syntax-highlighting.git
    dest: "{{ zsh_global_oh_my_zsh_root }}/custom/plugins/zsh-syntax-highlighting"
  tags:
    - zsh

- name: global config directory
  become: true
  file:
    path: "{{ zsh_global_config_root }}"
    state: directory
    owner: root
    group: root
    mode: "755"
  tags:
    - zsh

- name: global zshrc
  become: true
  template:
    src: global.zshrc.j2
    dest: "{{ zsh_global_config_root }}/zshrc"
    owner: root
    group: root
    mode: "644"
  tags:
    - zsh

- name: ensure global zshrc invocation
  become: true
  lineinfile:
    dest: /etc/zsh/zshrc
    line: "source {{ zsh_global_config_root }}/zshrc"
  tags:
    - zsh

- name: user zshrc
  copy:
    src: user.zshrc
    dest: /home/{{ zsh_default_user }}/.zshrc
    owner: "{{ zsh_default_user }}"
    group: "{{ zsh_default_user }}"
    mode: "600"
  tags:
    - zsh

- name: root zshrc
  become: true
  copy:
    src: root.zshrc
    dest: /root/.zshrc
    owner: root
    group: root
    mode: "600"
  tags:
    - zsh

- name: change login shells
  become: true
  user:
    name: "{{ item }}"
    shell: /bin/zsh
  with_items:<commit_msg>zsh role: replaces with_items with loop.<commit_after>---
- name: install packages
  become: true
  apt:
    name: "{{ item }}"
    state: present
  loop:
    - direnv
    - git
    - powerline
    - zsh
  tags:
    - zsh

- name: install Oh My ZSH!
  become: true
  shell: ZSH={{ zsh_global_oh_my_zsh_root }} sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  tags:
    - zsh

- name: direnv hook
  become: true
  copy:
    src: direnv.zsh
    dest: "{{ zsh_global_oh_my_zsh_root }}/custom/direnv.sh"
    owner: root
    group: root
    mode: "644"
  tags:
    - zsh

- name: install powerlevel9k theme
  become: true
  git:
    repo: https://github.com/bhilburn/powerlevel9k.git
    dest: "{{ zsh_global_oh_my_zsh_root }}/custom/themes/powerlevel9k"
  tags:
    - zsh

- name: install syntax highlighting plugin
  become: true
  git:
    repo: git://github.com/zsh-users/zsh-syntax-highlighting.git
    dest: "{{ zsh_global_oh_my_zsh_root }}/custom/plugins/zsh-syntax-highlighting"
  tags:
    - zsh

- name: global config directory
  become: true
  file:
    path: "{{ zsh_global_config_root }}"
    state: directory
    owner: root
    group: root
    mode: "755"
  tags:
    - zsh

- name: global zshrc
  become: true
  template:
    src: global.zshrc.j2
    dest: "{{ zsh_global_config_root }}/zshrc"
    owner: root
    group: root
    mode: "644"
  tags:
    - zsh

- name: ensure global zshrc invocation
  become: true
  lineinfile:
    dest: /etc/zsh/zshrc
    line: "source {{ zsh_global_config_root }}/zshrc"
  tags:
    - zsh

- name: user zshrc
  copy:
    src: user.zshrc
    dest: /home/{{ zsh_default_user }}/.zshrc
    owner: "{{ zsh_default_user }}"
    group: "{{ zsh_default_user }}"
    mode: "600"
  tags:
    - zsh

- name: root zshrc
  become: true
  copy:
    src: root.zshrc
    dest: /root/.zshrc
    owner: root
    group: root
    mode: "600"
  tags:
    - zsh

- name: change login shells
  become: true
  user:
    name: "{{ item }}"
    shell: /bin/zsh
  loop:
{'fraction_non_alphanumeric': 0.1275233874938454, 'fraction_numerical': 0.009354997538158542, 'mean_word_length': 2.4432203389830507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3361498', 'n_tokens_mistral': 1636, 'n_tokens_neox': 1622, 'n_words': 375}