-
Notifications
You must be signed in to change notification settings - Fork 1
/
vim.yml
33 lines (29 loc) · 881 Bytes
/
vim.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- name: Set Up Vim
hosts: localhost
become_user: "{{ username }}"
tasks:
- name: install vim and requirements
become: True
become_user: root
package: name={{ item }}
with_items:
- ack
- ctags
- ruby
- rubygem-rake
- vim
- name: check if .vim exists
stat: path=/home/{{ username }}/.vim
register: vim_dir
- name: check if .vim is a git repo
when: vim_dir.stat.exists
stat: path=/home/{{ username }}/.vim/.git
register: vim_git
- name: backup .vim if it is not a repo
when: (vim_dir.stat.exists and vim_git.stat.isdir is not defined)
command: mv /home/{{ username }}/.vim /home/{{ username }}/.vim.backup
- name: copy vimrc.after to user home
copy: src=vimrc.after
dest=/home/{{ username }}/.vimrc.after
force=no