-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-playbook.yml
More file actions
169 lines (146 loc) · 4.58 KB
/
Copy pathinstall-playbook.yml
File metadata and controls
169 lines (146 loc) · 4.58 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
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
---
- hosts: localhost
connection: local
become: no
become_user: root
vars:
install_state: present # Override with: --extra-vars "install_state=latest"
tasks:
- name: Install XCode Command Line Tools (Error means already installed)
shell: xcode-select --install || exit 0
ignore_errors: yes
- name: Use brew bundle to install brew packages in Brewfile
shell:
cmd: brew bundle
executable: /bin/bash
register: brew_bundle_result
changed_when: "'Upgrading' in brew_bundle_result.stdout or 'Installing' in brew_bundle_result.stdout"
ignore_errors: yes
- name: Show Hidden Folders in Finder
shell: defaults write com.apple.finder AppleShowAllFiles YES
tags: macos
- name: Install Oh My ZSH
shell: sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
args:
creates: ~/.oh-my-zsh/oh-my-zsh.sh
- name: Grab a copy of Powerline patched fonts
git:
repo: https://github.com/powerline/fonts.git
dest: ~/dotfiles/fonts
- name: Copy Source Code Pro font to ~/Library/Fonts
copy:
src: ~/dotfiles/fonts/SourceCodePro/
dest: ~/Library/Fonts
- name: Grab the you-should-use OhMyZSH Plugin
git:
repo: https://github.com/MichaelAquilina/zsh-you-should-use.git
dest: ~/.oh-my-zsh/custom/plugins/you-should-use
- name: Grab tpm (Tmux Plugin Manager) From git
git:
repo: https://github.com/tmux-plugins/tpm
dest: ~/.tmux/plugins/tpm
tags:
- tmux
- name: Link files
file:
src: "{{ playbook_dir }}/{{item}}"
dest: "~/.{{item}}"
state: link
force: true
with_items:
- agignore
- zshrc
- tmux.conf
- asdfrc
- gitconfig
- ssh_config
- wezterm.lua
- tool-versions
tags: link
- name: Ensure ~/.config directory exists
file:
path: ~/.config
state: directory
mode: '0755'
tags: link
- name: Check if config paths exist and are not symlinks
stat:
path: "~/.config/{{item}}"
with_items:
- nvim
- "atuin"
- "starship.toml"
- "aerospace"
- "borders"
- "ghostty"
tags: link
register: config_paths_stat
- name: Remove existing config directories/files if they exist and are not symlinks
file:
path: "~/.config/{{item.item}}"
state: absent
when: item.stat.exists and not item.stat.islnk
with_items: "{{ config_paths_stat.results }}"
tags: link
- name: Link config files
file:
src: "{{ playbook_dir }}/config/{{item}}"
dest: "~/.config/{{item}}"
state: link
force: true
with_items:
- nvim
- "atuin"
- "starship.toml"
- "aerospace"
- "borders"
- "ghostty"
tags: link
- name: Ensure ~/.ssh directory exists
file:
path: ~/.ssh
state: directory
mode: '0700'
tags: link
- name: Link ssh config
file:
src: "{{ playbook_dir }}/ssh_config"
dest: "~/.ssh/config"
state: link
tags: link
- name: Link hooks to .git/hooks
file:
src: "{{ playbook_dir }}/hooks/post-merge"
dest: "{{ playbook_dir }}/.git/hooks/post-merge"
state: link
tags: link
- name: Start the borders service (equivalent to `brew services start foo`)
community.general.homebrew_services:
name: borders
state: present
- name: Install rustup for rust management
shell:
cmd: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
creates: ~/.cargo/bin/rustup
- name: Install Volta for node management
shell:
cmd: curl https://get.volta.sh | bash
creates: ~/.volta/bin/volta
- name: Install Cursor Agent CLI
shell:
cmd: curl https://cursor.com/install -fsS | bash
creates: ~/.local/bin/cursor-agent
- name: Install CodeRabbit CLI
shell:
cmd: curl -fsSL https://cli.coderabbit.ai/install.sh | sh
creates: ~/.local/bin/coderabbit
- name: Cron job to auto-update Oh My ZSH daily at 3:33am
cron:
name: "Update Oh My ZSH"
minute: "33"
hour: "3"
job: "ZSH=$HOME/.oh-my-zsh $HOME/.oh-my-zsh/tools/upgrade.sh > /tmp/omz-update.log 2>&1"
- name: Install Claude Code
shell:
cmd: curl -fsSL https://claude.ai/install.sh | bash
creates: ~/.local/bin/claude