2021-11-24 10:19:49 +00:00
|
|
|
- name: Install vim (RHEL based)
|
2021-10-22 11:45:20 +00:00
|
|
|
become: true
|
|
|
|
package:
|
2021-11-24 10:19:49 +00:00
|
|
|
name:
|
2022-06-01 11:59:16 +00:00
|
|
|
- neovim
|
2022-01-03 09:46:10 +00:00
|
|
|
- the_silver_searcher
|
2022-01-18 09:19:19 +00:00
|
|
|
state: present
|
2021-11-24 10:19:49 +00:00
|
|
|
when: ansible_facts['os_family'] == "RedHat"
|
|
|
|
|
|
|
|
- name: Install vim (Debian based)
|
|
|
|
become: true
|
|
|
|
package:
|
2022-01-03 09:46:10 +00:00
|
|
|
name:
|
2022-06-01 11:59:16 +00:00
|
|
|
- neovim
|
2022-01-03 09:46:10 +00:00
|
|
|
- silversearcher-ag
|
2021-11-24 10:19:49 +00:00
|
|
|
state: present
|
|
|
|
when: ansible_facts['os_family'] == "Debian"
|
2021-10-22 11:45:20 +00:00
|
|
|
|
2022-06-01 11:59:16 +00:00
|
|
|
- name: Prepare vim config directory
|
2021-10-22 11:45:20 +00:00
|
|
|
file:
|
2022-06-01 11:59:16 +00:00
|
|
|
path: ~/.config/nvim/
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
- name: Setup vim plug
|
|
|
|
file:
|
|
|
|
path: ~/.local/share/nvim/site/autoload
|
2021-10-22 11:45:20 +00:00
|
|
|
state: directory
|
2022-01-18 09:19:19 +00:00
|
|
|
mode: '0755'
|
2021-10-22 11:45:20 +00:00
|
|
|
|
|
|
|
- name: Install vim Plug
|
|
|
|
get_url:
|
|
|
|
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
2022-06-01 11:59:16 +00:00
|
|
|
dest: ~/.local/share/nvim/site/autoload/plug.vim
|
2021-10-22 11:45:20 +00:00
|
|
|
|
|
|
|
- name: "Copy vimrc file"
|
|
|
|
copy:
|
|
|
|
src: dotfiles/vimrc
|
2022-06-01 11:59:16 +00:00
|
|
|
dest: "~/.config/nvim/init.vim"
|
2022-01-18 09:19:19 +00:00
|
|
|
mode: preserve
|
|
|
|
changed_when: false
|
2021-10-22 11:45:20 +00:00
|
|
|
|
|
|
|
- name: "Set vim colorscheme"
|
|
|
|
ansible.builtin.lineinfile:
|
2022-06-01 11:59:16 +00:00
|
|
|
path: "~/.config/nvim/init.vim"
|
2021-10-22 11:45:20 +00:00
|
|
|
regexp: "^colorscheme"
|
2022-06-01 11:59:16 +00:00
|
|
|
line: "colorscheme {{ theme }}"
|
2022-01-18 09:19:19 +00:00
|
|
|
changed_when: false
|
2021-10-22 11:45:20 +00:00
|
|
|
|
2021-11-18 08:59:41 +00:00
|
|
|
#- name: "Set vim lightline colorscheme"
|
|
|
|
# ansible.builtin.lineinfile:
|
|
|
|
# path: "~/.vimrc"
|
|
|
|
# regexp: "^let g:lightline.colorscheme"
|
|
|
|
# line: "let g:lightline.colorscheme = '{{theme}}'"
|