setup-cockpit/roles/zsh/tasks/main.yml

37 lines
1.3 KiB
YAML

---
- name: Install bash-completion (Archlinux)
become: true
pacman:
name:
- zsh-theme-powerlevel10k
- zsh
- zsh-completions
- zsh-autosuggestions
- zsh-syntax-highlighting
when: ansible_distribution == 'Archlinux'
- name: Install bash-completion (Debian)
become: true
apt:
name:
- zsh-theme-powerlevel9k
- zsh
- zsh-completions
- zsh-autosuggestions
- zsh-syntax-highlighting
when: ansible_distribution == 'Debian'
- name: Copy files
copy: src={{ item.src }} dest={{ item.dest }} backup=true
with_items:
- { src: 'zshrc', dest: '~/.zshrc' }
- { src: 'zshenv', dest: '~/.zshenv' }
- { src: 'zprofile', dest: '~/.zprofile' }
- { src: 'p10k.zsh', dest: '~/.p10k.zsh' }
- name: Clone repos
git: repo={{ item.repo }} dest={{ item.dest }} clone=yes version={{ item.version }} update=no
with_items:
- { repo: 'https://github.com/softmoth/zsh-vim-mode.git', dest: '~/.git_clones/zsh-vim-mode', version: 'main' }
- { repo: 'https://github.com/zsh-users/zsh-autosuggestions.git', dest: '~/.git_clones/zsh-autosuggestions', version: 'master' }
- { repo: 'https://github.com/zsh-users/zsh-syntax-highlighting.git', dest: '~/.git_clones/zsh-syntax-highlighting', version: 'master' }