dotfiles/playbooks/roles/shell/tasks/zsh.yml

57 lines
1.4 KiB
YAML
Raw Normal View History

---
- name: Create directories in `~/.local`
file:
path: "{{ item }}"
state: directory
loop:
- ~/.local/bin
- ~/.local/share
- name: Check for oh-my-zsh
stat:
path: ~/.oh-my-zsh
register: ohmyzsh_directory
- name: Install oh-my-zsh
shell: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
when: not ohmyzsh_directory.stat.exists
- name: Clone zsh-autosuggestions
git:
repo: https://github.com/zsh-users/zsh-autosuggestions
dest: ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
- name: Clone zsh-syntax-highlighting
git:
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
dest: ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
- name: Clone starship
shell: sh -c "$(curl -fsSL https://starship.rs/install.sh)" "" -f -b $HOME/.local/bin
- name: Create zshrc
template:
src: templates/zshrc.j2
dest: ~/.zshrc
- name: Create starship configuration
template:
src: templates/starship.toml.j2
dest: ~/.config/starship.toml
- name: Install script for toolbox name retrieval
template:
src: templates/scripts/toolbox_name.sh
dest: ~/.local/bin/toolbox_name.sh
- name: Install script for paste.sr.ht
template:
src: templates/scripts/srht.py
dest: ~/.local/bin/srht.py
- name: Symlink paste.sr.ht
ansible.builtin.file:
src: ./srht.py
dest: ~/.local/bin/srht
state: link