This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- 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'
|
||||
|
||||
Reference in New Issue
Block a user