Files
ansible-repo/playbooks/zsh.yml
hogweed1 9d7bf72f28
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 0s
well,
2026-11-04 20:45:15 +10:00

52 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- name: Настройка ZSH + Oh My Zsh + Powerlevel10k
hosts: homelab
become: yes
vars:
username: "твой_юзер" # укажи пользователя, под которым работаешь
user_home: "/home/{{ username }}"
tasks:
- name: Установка zsh и git
apt:
name:
- zsh
- git
state: present
update_cache: yes
- name: Изменение дефолтной оболочки пользователя на ZSH
user:
name: "{{ username }}"
shell: /bin/zsh
- name: Клонирование Oh My Zsh
git:
repo: 'https://github.com'
dest: "{{ user_home }}/.oh-my-zsh"
depth: 1
become_user: "{{ username }}"
- name: Клонирование темы Powerlevel10k
git:
repo: 'https://github.com'
dest: "{{ user_home }}/.oh-my-zsh/custom/themes/powerlevel10k"
depth: 1
become_user: "{{ username }}"
- name: Копирование эталонного конфига .p10k.zsh
copy:
src: files/.p10k.zsh
dest: "{{ user_home }}/.p10k.zsh"
owner: "{{ username }}"
group: "{{ username }}"
mode: '0644'
- name: Копирование настроенного .zshrc
template:
src: templates/.zshrc.j2
dest: "{{ user_home }}/.zshrc"
owner: "{{ username }}"
group: "{{ username }}"
mode: '0644'