ansible/roles/zsh/tasks/main.yml

33 lines
1.4 KiB
YAML
Raw Normal View History

- name: Setup user zsh config
block:
- name: Add .zshrc
copy: src=zshrc.zsh dest=/home/{{ name }}/.zshrc owner={{ name }} group={{ name }} mode=0755
- name: Add zsh zstyles config
copy: src=zstyles.zsh dest=/home/{{ name }}/.zstyles owner={{ name }} group={{ name }} mode=0755
- name: Add .env file
copy: src=env.sh dest=/home/{{ name }}/.env owner={{ name }} group={{ name }} mode=0755
- name: Add .aliases
copy: src=aliases.sh dest=/home/{{ name }}/.aliases owner={{ name }} group={{ name }} mode=0755
- name: Add .bat.conf
copy: src=bat.conf dest=/home/{{ name }}/.bat.conf owner={{ name }} group={{ name }} mode=0755
- name: Install zsh syntax highlighting
git:
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
dest: /home/{{ name }}/.zshrc.d/zsh-syntax-highlighting
update: yes
clone: yes
rescue:
- name: Remove .zshrc
file: state=absent path=/home/{{ name }}/.zshrc
- name: Remove zsh zstyles config
file: state=absent path=/home/{{ name }}/.zstyles
- name: Remove .env file
file: state=absent path=/home/{{ name }}/.env
- name: Remove .aliases
file: state=absent path=/home/{{ name }}/.aliases
- name: Remove .bat.conf
file: state=absent path=/home/{{ name }}/.bat.conf
# - name: Remove zsh syntax highlighting
# file: state=absent path=/home/{{ name }}/.zshrc.d/zsh-syntax-highlighting