forked from jarias/mac-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration.yml
More file actions
74 lines (56 loc) · 2.61 KB
/
configuration.yml
File metadata and controls
74 lines (56 loc) · 2.61 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
---
# Configure your freshly installed software
- hosts: all
tasks:
- name: Clone oh-my-zsh
git: repo=https://github.com/robbyrussell/oh-my-zsh.git dest=/Users/{{ ansible_user_id }}/.oh-my-zsh
- name: add homebrew zsh to /etc/shells
lineinfile: dest=/etc/shells regexp="local" line="/usr/local/bin/zsh" state=present
become: yes
become_method: sudo
- name: backup .zshrc
command: rm ~/.zshrc
ignore_errors: True
- name: copy oh-my-zsh template
copy: src=/Users/{{ ansible_user_id }}/.oh-my-zsh/templates/zshrc.zsh-template dest=/Users/{{ ansible_user_id }}/.zshrc
- name: change shell
command: chsh -s /usr/local/bin/zsh
- name: change oh-my-zsh plugin list
lineinfile: dest=~/.zshrc regexp="^plugins=" line="plugins=(brew git git-flow-avh osx vagrant)" state=present
- name: change prompt theme
lineinfile: dest=~/.zshrc regexp="^ZSH_THEME=" line="ZSH_THEME=\"pygmalion\"" state=present
- name: install homesick
command: /usr/local/bin/gem install homesick --no-ri --no-rdoc
- name: clone homesick repos
command: /usr/local/bin/homesick clone {{item.repo}} creates=/Users/{{ lookup('env','USER') }}/.homesick/repos/{{ item.name }}
with_items:
- { repo: "https://github.com/edify/dotfiles.git", name: dotfiles }
- name: symlink dotfiles
command: /usr/local/bin/homesick symlink --force dotfiles
- name: ensure zshrc presence
ignore_errors: True
file: path=~/.zshrc state=touch
- name: add shim to zsh
lineinfile: dest=~/.zshrc regexp="\.zshrc\.local" line=". ~/.zshrc.local" state=present
- name: Install Dockutils
git: repo=https://github.com/kcrawford/dockutil.git dest=/Users/{{ ansible_user_id }}/src/github.com/kcrawford/dockutil
- name: clean dock
shell: "~/src/github.com/kcrawford/dockutil/scripts/dockutil --remove all creates=~/.managed-dock"
- name: flag managed dock
file: path=~/.managed-dock state=touch
- name: add apps
shell: "~/src/github.com/kcrawford/dockutil/scripts/dockutil --add '{{ item }}'"
ignore_errors: True
with_items:
- /Applications/Google Chrome.app
- /Applications/Skype.app
- /Applications/Slack.app
- /Applications/iTerm.app
- /Applications/LibreOffice.app
- name: add folders
shell: "~/src/github.com/kcrawford/dockutil/scripts/dockutil --add '{{ item.path }}' --view {{ item.view|default('grid') }} --display {{ item.display|default('folder') }} --sort {{ item.sort|default('name') }}"
ignore_errors: True
with_items:
- { path: ~/Downloads, sort: datemodified }
- name: remove ~/src folder
file: path=~/src state=absent