-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtimmify_playbook.yml
186 lines (157 loc) · 4.74 KB
/
timmify_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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
---
- hosts: all
tags: [ basic, macos ]
become: no
tasks:
- name: Add ls alias
lineinfile:
path: ~/.bash_aliases
line: alias l='ls -ltrp'
create: yes
- name: Add vim alias
lineinfile:
path: ~/.bash_aliases
line: alias v='vim'
create: yes
- name: Set vi
lineinfile:
path: ~/.bash_aliases
line: set -o vi
create: yes
- name: Copy local .zshrc
copy:
force: yes
src: zsh/.zshrc
dest: ~/.zshrc
- name: Copy tmux.conf
copy:
force: yes
src: tmux/.tmux.conf
dest: ~/.tmux.conf
- name: Copy .vimrc
copy:
force: yes
src: vim/.vimrc
dest: ~/.vimrc
- name: Create .vim/autoload directory to install vim Plug
file:
path: ~/.vim/autoload
state: directory
- name: Copy .gitconfig
copy:
force: yes
src: git/.gitconfig
dest: ~/.gitconfig
- name: Install VIM Plug
get_url:
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
dest: ~/.vim/autoload/plug.vim
- name: Install VIM plugins
shell:
cmd: vim -c -u ~/.vimrc +PlugInstall +qall
- hosts: all
tags: system
become: yes
tasks:
- name: Update and upgrade
apt:
upgrade: yes
- name: Install Build Tools
apt: name={{ item }} state=latest update_cache=yes
loop: [ 'build-essential', 'git', 'curl' ]
- name: Install ZSH
apt:
name: zsh
state: latest
- name: Install full featured VIm
apt:
name: vim-nox
state: latest
update_cache: yes
force_apt_get: yes
- name: Install The Silver Searcher
apt:
name: silversearcher-ag
state: latest
update_cache: yes
force_apt_get: yes
- name: Nodejs, needed for VIM COC
apt: name={{ item }} state=latest update_cache=yes
loop: [ 'nodejs', 'yarn' ]
# - name: Install aptitude using apt
# apt: name=aptitude state=latest update_cache=yes force_apt_get=yes
#
# - name: Install required system packages
# apt: name={{ item }} state=latest update_cache=yes
# loop: [ 'apt-transport-https', 'ca-certificates', 'curl', 'software-properties-common' ]
# - name: Add Docker GPG apt Key
# apt_key:
# url: https://download.docker.com/linux/ubuntu/gpg
# state: present
#
# - name: Add Docker Repository
# apt_repository:
# repo: deb https://download.docker.com/linux/ubuntu bionic stable
# state: present
#
# - name: Update apt and install docker-ce
# apt: update_cache=yes name=docker-ce state=latest
#
# - name: Add user to groups
# user:
# name: vagrant
# groups: docker
# User centric installs
- hosts: all
tags: zsh
become: no
tasks:
- name: Download Oh-My-ZSH install script
get_url:
url: https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh
dest: /tmp/install.sh
mode: '0766'
- name: Install Oh-My-ZSH
shell: yes | KEEP_ZSHRC=yes /bin/sh /tmp/install.sh
args:
creates: ~/.oh-my-zsh
- name: Install Spaceship for Oh-My-ZSH
git:
repo: https://github.com/spaceship-prompt/spaceship-prompt.git
depth: 1
dest: ~/.oh-my-zsh/custom/themes/spaceship-prompt
- name: Link spaceship theme
file:
src: ~/.oh-my-zsh/custom/themes/spaceship-prompt/spaceship.zsh-theme
dest: ~/.oh-my-zsh/custom/themes/spaceship.zsh-theme
state: link
- name: Install ZSH auto suggestions
git:
repo: https://github.com/zsh-users/zsh-autosuggestions
dest: ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
- name: Create ~/bin directory
file:
name: ~/bin
state: directory
- name: Install virtualenv-autodetect into ~/bin/
get_url:
url: https://raw.githubusercontent.com/egilewski/virtualenv-autodetect/master/virtualenv-autodetect.sh
dest: ~/bin/virtualenv-autodetect.sh
mode: '0755'
- hosts: all
tags: rust
become: no
tasks:
- name: Install Rust
expect:
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
creates: ~/.cargo
echo: yes
responses:
1) Proceed with installation (default): 1
- name: Install Rust components
shell:
cmd: rustup component add rls rust-analysis rust-src
# - name: Install Coc for VIM
# shell:
# cmd: vim -c CocInstall coc-rls