-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocal.yml
More file actions
128 lines (127 loc) · 4.86 KB
/
local.yml
File metadata and controls
128 lines (127 loc) · 4.86 KB
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
- hosts: localhost
become: yes
vars:
for_user: joseph
tasks:
- name: Install Packages
apt: name={{item}}
with_items:
- zsh
- zsh-syntax-highlighting
- vim
- tmux
- git
- wicd-curses
- xterm
- xmonad
- xmobar
- suckless-tools
- xscreensaver
- xinit
- thunderbird
- firefox
- chromium-browser
- openvpn
- gnupg2
- pinentry-curses
- pinentry-gtk2
- bluetooth
- silversearcher-ag
- wget
- curl
- laptop-mode-tools
- upower
- pass
- alsa-utils
- pulseaudio
- sshuttle
- cmake
- python-dev
- apt-transport-https
- udisks2
- ipcalc
- jq
- name: Install Snaps
command: snap install --classic {{item}}
with_items:
- skype
- goland
- name: Ensure User Directories Exist
file: path={{item}} state=directory owner={{for_user}} group={{for_user}} mode=774 recurse=yes
with_items:
- /home/{{for_user}}/.cache/zsh
- /home/{{for_user}}/.xmonad
- /home/{{for_user}}/.config/systemd/user
- /home/{{for_user}}/go/bin
- /home/{{for_user}}/go/pkg
- /home/{{for_user}}/go/src
- /home/{{for_user}}/bin
- /home/{{for_user}}/projects
- name: Copy User Files
copy: src={{item.src}} dest={{item.dest}} owner={{for_user}} group={{for_user}} mode=664 force=no
with_items:
- { src: "files/dotvimrc", dest: "/home/{{for_user}}/.vimrc" }
- { src: "files/dotideavimrc", dest: "/home/{{for_user}}/.ideavimrc" }
- { src: "files/dottmux.conf", dest: "/home/{{for_user}}/.tmux.conf" }
- { src: "files/dotzshrc", dest: "/home/{{for_user}}/.zshrc" }
- { src: "files/dotprofile", dest: "/home/{{for_user}}/.profile" }
- { src: "files/dotXdefaults", dest: "/home/{{for_user}}/.Xdefaults" }
- { src: "files/dotXresources", dest: "/home/{{for_user}}/.Xresources" }
- { src: "files/dotxinitrc", dest: "/home/{{for_user}}/.xinitrc" }
- { src: "files/dotxmobarrc", dest: "/home/{{for_user}}/.xmobarrc" }
- { src: "files/dotxscreensaver", dest: "/home/{{for_user}}/.xscreensaver" }
- { src: "files/xmonad.hs", dest: "/home/{{for_user}}/.xmonad/xmonad.hs" }
- { src: "files/ssh-agent.service", dest: "/home/{{for_user}}/.config/systemd/user/ssh-agent.service" }
- name: Copy User Scripts
copy: src={{item.src}} dest={{item.dest}} owner={{for_user}} group={{for_user}} mode=774 force=no
with_items:
- { src: "files/tor-browser", dest: "/home/{{for_user}}/bin/tor-browser" }
- { src: "files/listppa", dest: "/home/{{for_user}}/bin/listppa" }
- name: Use Zsh
command: usermod --shell /usr/bin/zsh {{for_user}}
- name: Install Zsh Autosuggestions
become_user: "{{for_user}}"
git: repo=https://github.com/zsh-users/zsh-autosuggestions.git dest=/home/{{for_user}}/projects/zsh-autosuggestions
# - name: Enable User SSH Agent Service
# become_user: "{{for_user}}"
# command: systemctl --user enable ssh-agent
- name: Compile Xmonad
become_user: "{{for_user}}"
command: xmonad --recompile
- name: Install Sublime Text
shell: |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
apt update
apt install sublime-text
- name: Install Vundle
become_user: "{{for_user}}"
git: repo=https://github.com/VundleVim/Vundle.vim.git dest=/home/{{for_user}}/.vim/bundle/Vundle.vim
- name: Install Vim Plugins
become_user: "{{for_user}}"
shell: vim -E -s -c "source /home/{{for_user}}/.vimrc" -c PluginInstall -c qa
ignore_errors: yes
- name: Install Go
shell: |
wget -c https://storage.googleapis.com/golang/go1.13.4.linux-amd64.tar.gz
tar -C /usr/local -xvzf go1.13.4.linux-amd64.tar.gz
rm go1.13.4.linux-amd64.tar.gz
- name: Install YouCompleteMe
become_user: "{{for_user}}"
shell: |
export PATH=$PATH:/usr/local/go/bin
cd /home/{{for_user}}/.vim/bundle/YouCompleteMe
./install.py --go-completer
- name: Install Tor Browser
become_user: "{{for_user}}"
shell: |
cd /home/{{for_user}}
wget -c https://www.torproject.org/dist/torbrowser/9.0.1/tor-browser-linux64-9.0.1_en-US.tar.xz
tar -xvJf tor-browser-linux64-9.0.1_en-US.tar.xz
rm tor-browser-linux64-9.0.1_en-US.tar.xz
# TODO:
# SSH and GPG Keys.
# Setup Pass.
# Copy /etc/ssh/ssh_config to ~/.ssh/config Add line "AddKeysToAgent yes".
# Firefox and Thunderbird add-ons.
# Copy profile.d iterator from /etc/profile to /etc/zsh/zprofile.