-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacos.yaml
156 lines (129 loc) · 3.55 KB
/
macos.yaml
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
---
- hosts: "local"
vars_files:
- "../vars/global-vars.yaml"
- "../vars/homebrew.yaml"
- "../vars/mas.yaml"
- "../vars/macos-docks.yaml"
roles:
- role: elliotweiser.osx-command-line-tools
- role: geerlingguy.mac.homebrew
tags:
- brew
- gui
when: ansible_distribution == 'MacOSX'
ignore_errors: true
- role: geerlingguy.mac.mas
tags:
- mas
- gui
ignore_errors: true
- role: geerlingguy.mac.dock
tags:
- dock
- gui
ignore_errors: true
tasks:
# run zshenv and print out all env in the shell
# store the output to a register
# this will be used in tasks when using the env. no need to run zshenv before running ansible-playbook
#
# obtained from
# https://stackoverflow.com/a/74932715/3053548
- name: source zshenv
shell:
cmd: source ../tools/zsh/.zshenv; env
register: out
changed_when: false
tags: always
# extract the envs and store them as a dictionary
- name: store zshenv as fact
set_fact:
zshenv: "{{ dict( out.stdout.splitlines() | map('split', '=', 1) ) }}"
changed_when: false
tags: always
# ------------------------------------------------------------------------------------------- #
- name: "print env"
debug:
msg: "{{ zshenv }}"
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/code-directory.yaml"
tags:
- code-directory
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/alacritty.yaml"
tags:
- alacritty
- gui
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/kitty.yaml"
tags:
- kitty
- gui
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/git.yaml"
tags:
- git
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/lazygit.yaml"
tags:
- lazygit
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/nerdfonts.yaml"
tags:
- nerdfonts
- gui
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/nvm.yaml"
tags:
- nvm
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/npm.yaml"
tags:
- npm
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/neofetch.yaml"
tags:
- neofetch
- terminal
#
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/vimv.yaml"
tags:
- vimv
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/go-packages.yaml"
tags:
- go-packages
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/tmux.yaml"
tags:
- tmux
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/astronvim.yaml"
tags:
- astronvim
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/zsh.yaml"
tags:
- zsh
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/ohmyzsh.yaml"
tags:
- ohmyzsh
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/pyenv.yaml"
tags:
- pyenv
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/pip3.yaml"
tags:
- pip3
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/luarocks.yaml"
tags:
- luarocks
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/vscode-extensions.yaml"
tags:
- vscode-extensions
- gui
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/cargo-packages.yaml"
tags:
- cargo-packages
- terminal