60 lines
1.2 KiB
YAML
60 lines
1.2 KiB
YAML
- name: Purge Vim
|
|
apt:
|
|
name: vim
|
|
state: absent
|
|
|
|
- name: Install Neovim
|
|
apt:
|
|
name:
|
|
- neovim
|
|
state: latest
|
|
install_recommends: false
|
|
|
|
- name: Create .config folder
|
|
file:
|
|
path: "/home/{{ user }}/.config"
|
|
state: directory
|
|
owner: 1000
|
|
group: 1000
|
|
mode: "0755"
|
|
|
|
- name: Create nvim folder
|
|
file:
|
|
path: "/home/{{ user }}/.config/nvim"
|
|
state: directory
|
|
owner: 1000
|
|
group: 1000
|
|
mode: "0755"
|
|
become: yes
|
|
become_method: sudo
|
|
become_user: "{{ user }}"
|
|
|
|
- name: Copy nvim config
|
|
copy:
|
|
src: "/home/{{ user }}/.config/nvim/"
|
|
dest: "/home/{{ user }}/.config/nvim/"
|
|
owner: 1000
|
|
group: 1000
|
|
mode: "0755"
|
|
become: yes
|
|
become_method: sudo
|
|
become_user: "{{ user }}"
|
|
|
|
- name: Install Vim Plug
|
|
command: >
|
|
vim -u /home/{{ user }}/.config/nvim/init.vim +'PlugInstall --sync' +qa
|
|
args:
|
|
creates: "/home/{{ user }}/.config/nvim/plugged"
|
|
become: yes
|
|
become_method: sudo
|
|
become_user: "{{ user }}"
|
|
|
|
- name: Uninstall Vim Plug
|
|
command: >
|
|
vim -u /home/{{ user }}/.config/nvim/init.vim +'PlugClean --sync' +qa
|
|
args:
|
|
creates: "/home/{{ user }}/.config/nvim/plugged"
|
|
become: yes
|
|
become_method: sudo
|
|
become_user: "{{ user }}"
|