oh-my-zsh/tasks/install-zsh.yml

27 lines
926 B
YAML

---
- name: Install zsh for Debian
import_tasks: install-zsh-debian.yml
when: ansible_facts['os_family']|lower == 'debian'
- name: Install zsh for Ubuntu
import_tasks: install-zsh-ubuntu.yml
when: ansible_facts['os_family']|lower == 'ubuntu'
- name: check out oh-my-zsh git repository
git:
repo: "{{ oh_my_zsh_repo }}"
dest: "{{ oh_my_zsh_install_folder }}"
update: yes
- name: copy .zsh template to "{{ oh_my_zsh_install_folder }}/.zshrc"
copy:
src: "{{ oh_my_zsh_install_folder }}/templates/zshrc.zsh-template"
dest: "{{ oh_my_zsh_install_folder }}/.zshrc"
- name: replace ZSH path in .zshrc
lineinfile:
path: "{{ oh_my_zsh_install_folder }}/.zshrc"
regexp: "^export ZSH="
line: "export ZSH={{ oh_my_zsh_install_folder }}"
- name: hardlink .zshrc to /etc/skel
file:
src: "{{ oh_my_zsh_install_folder }}/.zshrc"
dest: "/etc/skel/.zshrc"
state: hard
force: true