---
  # Currently have a PR: https://github.com/robbyrussell/oh-my-zsh/pull/3617
  # Once this gets merged, we can change back to master.
- name: clone oh-my-zsh
  git: repo=https://github.com/MatthewHager/oh-my-zsh.git dest=~/.oh-my-zsh

- name: copy template .zshrc file into place
  copy: src=~/.oh-my-zsh/templates/zshrc.zsh-template dest=~/.zshrc force=no

- name: override zsh_custom path
  lineinfile: dest=~/.zshrc line=ZSH_CUSTOM={{ stack_d }}

- name: add zsh configuration
  copy: src=zsh.zsh dest={{ stack_d }}

- name: register user_shell variable
  shell: dscl localhost -read /Local/Default/Users/{{ ansible_user_id }} UserShell
  register: user_shell
  changed_when: false

- name: ensure shell is zsh
  shell: sudo chsh -s /bin/zsh {{ ansible_user_id }}
  when: '"/bin/zsh" not in user_shell.stdout'

---
  # Currently have a PR: https://github.com/robbyrussell/oh-my-zsh/pull/3617
  # Once this gets merged, we can change back to master.
- name: clone oh-my-zsh
  git: repo=https://github.com/MatthewHager/oh-my-zsh.git dest=~/.oh-my-zsh

- name: copy template .zshrc file into place
  copy: src=~/.oh-my-zsh/templates/zshrc.zsh-template dest=~/.zshrc force=no

- name: source ~/.stack.d/*.zsh files
  lineinfile: dest=~/.zshrc line="for f in {{ stack_d }}/*.zsh; do source $f; done" insertbefore=BOF

- name: add zsh configuration
  copy: src=zsh.zsh dest={{ stack_d }}

- name: register user_shell variable
  shell: dscl localhost -read /Local/Default/Users/{{ ansible_user_id }} UserShell
  register: user_shell
  changed_when: false

- name: ensure shell is zsh
  shell: sudo chsh -s /bin/zsh {{ ansible_user_id }}
  when: '"/bin/zsh" not in user_shell.stdout'

Change sourcing of zsh files in stack.d.
Change sourcing of zsh files in stack.d.
