This commit is contained in:
@@ -49,7 +49,7 @@ vms:
|
||||
#### TODO
|
||||
lxc:
|
||||
hosts:
|
||||
|
||||
## TODO :: а где ns??
|
||||
|
||||
192.168.0.110:
|
||||
atuin.guaranteedstruggle.host:
|
||||
|
||||
53
files/.vimrc
Normal file
53
files/.vimrc
Normal file
@@ -0,0 +1,53 @@
|
||||
set nocompatible
|
||||
set path+=**
|
||||
set wildmenu
|
||||
|
||||
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
|
||||
set hlsearch
|
||||
set nu
|
||||
set rnu
|
||||
|
||||
"Map <leader> key to comma
|
||||
let mapleader = ','
|
||||
|
||||
"map F3 to toggle line-numbers
|
||||
nmap <F3> :set nu! <CR>
|
||||
|
||||
""map <leader>F3 to toggle line-numbers
|
||||
nmap <leader><F3> :set rnu! <CR>
|
||||
nmap <F4> :set rnu! <CR>
|
||||
|
||||
|
||||
"map F3 to toggle line-numbers in INSET mode
|
||||
imap <F3> <ESC> :set nu! <CR>i
|
||||
|
||||
""map <leader>F4 to toggle line-numbers in INSERT
|
||||
imap <F4> <ESC> :set rnu! <CR>i
|
||||
|
||||
|
||||
set t_Co=256
|
||||
|
||||
" Enable filetype detection, plugins, and custom indentation
|
||||
filetype plugin indent on
|
||||
|
||||
" Turn on syntax highlighting
|
||||
syntax enable
|
||||
|
||||
|
||||
" --- New Color Scheme Settings ---
|
||||
" Enable 24-bit True Color (crucial for modern color schemes)
|
||||
"if (has("termguicolors"))
|
||||
" set termguicolors
|
||||
"endif
|
||||
|
||||
" Set the background style (dark or light)
|
||||
set background=dark
|
||||
|
||||
" Load the cloned theme
|
||||
"let g:gruvbox_contrast_dark = 'hard'
|
||||
"colorscheme gruvbox
|
||||
colorscheme challenger_deep
|
||||
"colorscheme dogrun
|
||||
36
playbooks/software/vim/deploy_vim.yml
Normal file
36
playbooks/software/vim/deploy_vim.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: "Этап 2: Деплой VIM plugins"
|
||||
hosts: all
|
||||
become: yes
|
||||
vars:
|
||||
# Укажи здесь root и своего основного пользователя
|
||||
vim_users:
|
||||
- "root"
|
||||
- "hogweed1"
|
||||
|
||||
# Вставь сюда сгенерированный токен из Gitea
|
||||
gitea_token: "0e2d23940d1862ae1558476f39565cd5bb2bcd88"
|
||||
|
||||
# Базовый адрес твоей организации/юзера в Gitea (БЕЗ http://)
|
||||
gitea_base: "git.guaranteedstruggle.host/hackerspace"
|
||||
|
||||
# Формируем ссылки с токеном. В таком формате Git пролетает авторизацию без вопросов
|
||||
repo_rustvim: "https://{{ gitea_token }}@{{ gitea_base }}/rust.vim_mirror.git"
|
||||
repo_tomlvim: "https://{{ gitea_token }}@{{ gitea_base }}/vim-toml_mirror.git"
|
||||
repo_challengerdeep: "https://{{ gitea_token }}@{{ gitea_base }}/vim_theme-challenger-deep_mirror.git"
|
||||
|
||||
tasks:
|
||||
- name: Установка пакета vim
|
||||
apt:
|
||||
name:
|
||||
- vim
|
||||
state: present
|
||||
update_cache: yes
|
||||
tags: [always]
|
||||
|
||||
- name: Накат ZSH и плагинов для каждого пользователя
|
||||
include_tasks: user_tasks.yml
|
||||
loop: "{{ vim_users }}"
|
||||
loop_control:
|
||||
loop_var: current_user
|
||||
tags: [always]
|
||||
87
playbooks/software/vim/user_tasks.yml
Normal file
87
playbooks/software/vim/user_tasks.yml
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
- name: "[{{ current_user }}] Фиксируем переменную user_home"
|
||||
set_fact:
|
||||
#user_home: "{{ getent_passwd[current_user] }}"
|
||||
user_home: "{{ '/root' if current_user == 'root' else '/home/' ~ current_user }}"
|
||||
tags: [always]
|
||||
|
||||
- name: Creates directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ user_home }}/.vim/pack/plugins/start"
|
||||
state: directory
|
||||
group: "{{current_user}}"
|
||||
owner: "{{current_user}}"
|
||||
|
||||
# 0e2d23940d1862ae1558476f39565cd5bb2bcd88
|
||||
# ansible-stuff token gitea
|
||||
|
||||
|
||||
# ==========================================
|
||||
# БЛОК 3: НАСТРОЙКА КОНФИГУРАЦИОННЫХ ФАЙЛОВ
|
||||
# ==========================================
|
||||
- name: "Финализация конфигурации"
|
||||
block:
|
||||
- name: "[{{ current_user }}] Копируем эталонный файл настроек"
|
||||
copy:
|
||||
src: ../../../files/.vimrc
|
||||
dest: "{{ user_home }}/.vimrc"
|
||||
owner: "{{ current_user }}"
|
||||
group: "{{ current_user }}"
|
||||
mode: '0655'
|
||||
become_user: "{{ current_user }}"
|
||||
tags: [deploy, update]
|
||||
|
||||
|
||||
# ==========================================
|
||||
# БЛОК 1: ПЕРВИЧНАЯ РАСКАТКА (БЫСТРЫЙ CLONE)
|
||||
# ==========================================
|
||||
- name: "Первичный деплой репозиториев"
|
||||
block:
|
||||
- name: "[{{ current_user }}] Клонируем плагин rust-vim"
|
||||
git:
|
||||
repo: "{{ repo_rustvim }}"
|
||||
dest: "{{ user_home }}/.vim/pack/plugins/start/rust.vim"
|
||||
depth: 1
|
||||
update: no
|
||||
|
||||
- name: "[{{ current_user }}] Клонируем плагин vim-toml"
|
||||
git:
|
||||
repo: "{{ repo_tomlvim }}"
|
||||
dest: "{{ user_home }}/.vim/pack/plugins/start/vim-toml"
|
||||
depth: 1
|
||||
update: no
|
||||
|
||||
- name: "[{{ current_user }}] Клонируем тему challengerdeep"
|
||||
git:
|
||||
repo: "{{ repo_challengerdeep }}"
|
||||
dest: "{{ user_home }}/.vim/pack/plugins/start/challenger-deep"
|
||||
depth: 1
|
||||
update: no
|
||||
become_user: "{{ current_user }}"
|
||||
tags: [deploy]
|
||||
|
||||
# ==========================================
|
||||
# БЛОК 2: ОБНОВЛЕНИЕ ДО ПОСЛЕДНИХ ВЕРСИЙ (GIT PULL)
|
||||
# ==========================================
|
||||
|
||||
- name: "Обновление репозиториев"
|
||||
block:
|
||||
- name: "[{{ current_user }}] Обновляем плагин rust-vim до latest"
|
||||
git:
|
||||
repo: "{{ repo_rustvim }}"
|
||||
dest: "{{ user_home }}/.vim/pack/plugins/start/rust.vim"
|
||||
update: yes
|
||||
|
||||
- name: "[{{ current_user }}] Обновляем плагин vim-toml до latest"
|
||||
git:
|
||||
repo: "{{ repo_tomlvim }}"
|
||||
dest: "{{ user_home }}/.vim/pack/plugins/start/vim-toml"
|
||||
update: yes
|
||||
|
||||
- name: "[{{ current_user }}] Обновляем тему challengerdeep до latest"
|
||||
git:
|
||||
repo: "{{ repo_challengerdeep }}"
|
||||
dest: "{{ user_home }}/.vim/pack/plugins/start/challenger-deep"
|
||||
update: yes
|
||||
become_user: "{{ current_user }}"
|
||||
tags: [update]
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
- name: get it
|
||||
Reference in New Issue
Block a user