-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
65 lines (61 loc) · 1.95 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
- hosts: all
connection: local
become_method: sudo
tasks:
- name: Install dependency packages
become: yes
package: # works on fedora, package names are DNF specific
name: "{{ item }}"
state: present
loop:
- zsh
- fzf
- ranger
- neovim
- python3-neovim
- tmux
- fd-find # replacement for find
- entr # inotify alternative
- hub # GH interactions
- thefuck
- nodejs # required for vim coc
- npm # required for vim coc
- name: Create directories
file:
path: "{{ item }}"
state: directory
recurse: yes
mode: '0750'
loop:
- "{{ ansible_env.HOME }}/.config/nvim"
- "{{ ansible_env.HOME }}/.local/share/nvim/site/autoload"
- "{{ ansible_env.HOME }}/.config/ranger"
- name: Check if vim-plug is installed, only download it once
stat:
path: "{{ ansible_env.HOME }}/.local/share/nvim/site/autoload/plug.vim"
register: vim_plug
- name: Download vim plug if doesn't exist
get_url:
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
dest: "{{ ansible_env.HOME }}/.local/share/nvim/site/autoload/plug.vim"
mode: '0640'
when: not vim_plug.stat.exists
- name: Get tpm for tmux
git:
repo: 'https://github.com/tmux-plugins/tpm'
dest: "{{ ansible_env.HOME }}/.tmux/plugins/tpm"
- name: Set up config files
tags: config
copy:
src: "files/{{ item.name }}"
dest: "{{ ansible_env.HOME }}/{{ item.dest }}{{ item.name }}"
mode: '0640'
loop:
- { name: 'tmux.conf', dest: '.' }
- { name: 'zshrc', dest: '.' }
- { name: 'gitconfig', dest: '.' }
- { name: 'init.vim', dest: '.config/nvim/' }
- { name: 'coc-settings.json', dest: '.config/nvim/' }
- { name: 'rc.conf', dest: '.config/ranger/' }
...