Files
ansible-playbooks/roles/zsh/tasks/plugins.yml
T
2026-04-11 22:41:10 +02:00

57 lines
1.7 KiB
YAML

---
- name: Ensure plugins directory exists
ansible.builtin.file:
path: "{{ zsh_plugins_path }}"
state: directory
owner: root
group: users
mode: "0755"
- name: Add a readme file to advice from where this comes
ansible.builtin.copy:
dest: "{{ zsh_plugins_path }}/README.md"
content: |
# zsh plugins
Managed by Ansible
mode: "0644"
group: users
owner: root
- name: "Git clone plugins"
ansible.builtin.git:
repo: "{{ item.repo }}"
dest: "{{ item.dest }}"
update: true
version: "{{ item.version | default('master') }}"
loop:
- repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
dest: "{{ zsh_plugins_path }}/zsh-syntax-highlighting"
- repo: https://github.com/zsh-users/zsh-autosuggestions.git
dest: "{{ zsh_plugins_path }}/zsh-autosuggestions"
- repo: https://github.com/romkatv/powerlevel10k.git
dest: "{{ zsh_plugins_path }}/powerlevel10k"
- repo: https://github.com/zsh-users/zsh-history-substring-search.git
dest: "{{ zsh_plugins_path }}/zsh-history-substring-search"
- repo: https://github.com/Aloxaf/fzf-tab.git
dest: "{{ zsh_plugins_path }}/fzf-tab"
version: master
- name: Install fzf package
ansible.builtin.package:
name: fzf
state: present
- name: Assert plugins are available for any user
ansible.builtin.file:
path: "{{ item }}"
owner: root
group: users
mode: "0755"
state: directory
loop:
- "{{ zsh_plugins_path }}/zsh-syntax-highlighting"
- "{{ zsh_plugins_path }}/zsh-autosuggestions"
- "{{ zsh_plugins_path }}/powerlevel10k"
- "{{ zsh_plugins_path }}/zsh-history-substring-search"
- "{{ zsh_plugins_path }}/fzf-tab"