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

46 lines
1.2 KiB
YAML
Raw Normal View History

---
- 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: Create directories in `~/.local`
file:
path: "{{ item }}"
state: directory
loop:
- ~/.local/bin
- ~/.local/share
- name: Install script for toolbox name retrieval
template:
src: templates/scripts/toolbox_name.sh
dest: ~/.local/bin/toolbox_name.sh