linux-config/roles/vim_user/tasks/main.yml

44 lines
1,007 B
YAML
Raw Normal View History

- name: Install vim (RHEL based)
2021-10-22 11:45:20 +00:00
become: true
package:
name:
- vim-X11
- vim-common
- vim-minimal
2021-10-22 11:45:20 +00:00
state: latest
when: ansible_facts['os_family'] == "RedHat"
- name: Install vim (Debian based)
become: true
package:
name: vim-gtk
state: present
when: ansible_facts['os_family'] == "Debian"
2021-10-22 11:45:20 +00:00
- name: Prepare vim...
file:
path: ~/.vim/autoload
state: directory
- name: Install vim Plug
get_url:
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
dest: ~/.vim/autoload/plug.vim
- name: "Copy vimrc file"
copy:
src: dotfiles/vimrc
dest: "~/.vimrc"
- name: "Set vim colorscheme"
ansible.builtin.lineinfile:
path: "~/.vimrc"
regexp: "^colorscheme"
2021-11-18 08:59:41 +00:00
line: "colorscheme base16-{{theme}}"
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}}'"