-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
executable file
·47 lines (38 loc) · 928 Bytes
/
playbook.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env ansible-playbook
---
# Install basic vim configuration
- hosts: all
gather_facts: no
pre_tasks:
- setup:
gather_subset: min
tasks:
- name: check prerequisites
command: which {{ item }}
register: which_result
changed_when: false
with_items:
- git
- vim
- name: create .vim/ dirs
file:
path: "{{ ansible_user_dir }}/.vim/{{item}}"
state: directory
with_items:
- autoload
- undo
- name: install plug.vim
get_url:
dest: "{{ ansible_user_dir }}/.vim/autoload/plug.vim"
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
notify: install plugins
- name: copy .vimrc
copy:
dest: "{{ ansible_user_dir }}/.vimrc"
src: vimrc
register: vimrcfile
notify: install plugins
handlers:
- name: install plugins
command: vim +PlugInstall +qall
changed_when: false