File tree Expand file tree Collapse file tree 7 files changed +48
-26
lines changed Expand file tree Collapse file tree 7 files changed +48
-26
lines changed Original file line number Diff line number Diff line change 30
30
dest : " /Users/{{ ansible_user_id }}/.profile"
31
31
content : alias git='xcrun git'
32
32
33
- - name : ensure homebrew dir exists
34
- file :
35
- path : /usr/local/homebrew
36
- state : directory
37
- mode : 0755
38
- owner : " {{ ansible_user_id }}"
39
- group : " {{ ansible_user_gid }}"
40
- become : yes
33
+ - name : curl homebrew
34
+ block :
35
+ - stat :
36
+ path : /usr/local/homebrew
37
+ register : homebrew
41
38
42
- - name : install homebrew
43
- shell : cd /usr/local/src && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /usr/local/homebrew
39
+ - shell : rm -rf /usr/local/homebrew
40
+ when : homebrew.stat.exists
41
+ become : yes
42
+
43
+ - name : ensure homebrew dir exists
44
+ file :
45
+ path : /usr/local/homebrew
46
+ state : directory
47
+ mode : 0755
48
+ owner : " {{ ansible_user_id }}"
49
+ group : " {{ ansible_user_gid }}"
50
+ become : yes
51
+
52
+ - shell : cd /usr/local/src && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /usr/local/homebrew
44
53
45
54
- name : add homebrew binaries to path
46
55
copy :
47
- dest : " /Users/{{ ansible_user }}/.profile"
56
+ dest : " /Users/{{ ansible_user_id }}/.profile"
48
57
content : PATH=$PATH:/usr/local/homebrew/bin
49
58
50
59
- name : update homebrew
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : install cli for github
3
3
homebrew :
4
- name : github/gh/ gh
4
+ name : gh
5
5
state : latest
6
6
7
7
# http://pre-commit.com
Original file line number Diff line number Diff line change 7
7
8
8
- name : set fact for wsl environment
9
9
set_fact :
10
- wsl_environment : " {{ wsl_environment }}"
10
+ wsl_environment : " {{ wsl_environment | default('false') }}"
11
11
12
12
- name : template gitconfig
13
13
template :
Original file line number Diff line number Diff line change 4
4
name : the_silver_searcher
5
5
state : latest
6
6
7
- - name : install royal-tsx
8
- shell : brew cask install royal-tsx
9
-
10
- - name : install slack
11
- shell : brew cask install slack
12
- ignore_errors : yes # preinstalled version causing error
13
-
14
7
- name : install fswatch
15
8
homebrew :
16
9
name : fswatch
17
10
state : latest
18
11
19
- - name : install vagrant
20
- shell : brew cask install vagrant
21
-
22
12
- name : autohide OSX dock
23
13
shell : defaults write com.apple.dock autohide true
24
14
notify : restart dock
51
41
homebrew :
52
42
name : direnv
53
43
state : latest
44
+
45
+ - name : check if privileges cli app is installed (corporate nanny)
46
+ command : /Applications/Privileges.app/Contents/Resources/PrivilegesCLI --help
47
+ register : privs_install_check
48
+
49
+ - name : add privileges app alias
50
+ lineinfile :
51
+ dest : " ~/.zshrc"
52
+ line : alias privs=/Applications/Privileges.app/Contents/Resources/PrivilegesCLI
53
+ when : privs_install_check.rc == 1
Original file line number Diff line number Diff line change 6
6
7
7
- name : shim pyenv into ~/.profile
8
8
lineinfile :
9
- path : " /Users/{{ ansible_user }}/.profile"
9
+ path : " /Users/{{ ansible_user_id }}/.profile"
10
10
line : " export PATH=${PATH}:$(pyenv root)/shims"
11
11
regexp : " ^export PATH=${PATH}"
12
12
13
13
- name : Add pyenv to .profile
14
14
lineinfile :
15
- dest : " /Users/{{ ansible_user }}/.profile"
15
+ dest : " /Users/{{ ansible_user_id }}/.profile"
16
16
line : ' eval "$(pyenv init -)"'
17
17
18
18
# NOTE: CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install 3.7.3
Original file line number Diff line number Diff line change 29
29
30
30
- name : set fact for wsl environment
31
31
set_fact :
32
- wsl_environment : " {{ wsl_environment }}"
32
+ wsl_environment : " {{ wsl_environment | default('false') }}"
33
33
34
34
- name : template vimrc
35
35
template :
41
41
git :
42
42
repo : ' https://github.com/scrooloose/nerdtree.git'
43
43
dest : ~/.vim/bundle/nerdtree
44
+ force : yes
44
45
45
46
- name : clone vim-sensible to ~/.vim/bundle/
46
47
git :
47
48
repo : ' https://github.com/tpope/vim-sensible.git'
48
49
dest : ~/.vim/bundle/vim-sensible
50
+ force : yes
49
51
50
52
- name : clone vim-airline to ~/.vim/bundle/
51
53
git :
52
54
repo : https://github.com/vim-airline/vim-airline
53
55
dest : ~/.vim/bundle/vim-airline
56
+ force : yes
54
57
55
58
- name : clone vim-mustache-handlebars to ~/.vim/bundle
56
59
git :
57
60
repo : https://github.com/mustache/vim-mustache-handlebars.git
58
61
dest : ~/.vim/bundle/vim-mustache-handlebars
62
+ force : yes
59
63
60
64
- name : clone vim-easy-align to ~/.vim/bundle/
61
65
git :
62
66
repo : https://github.com/junegunn/vim-easy-align
63
67
dest : ~/.vim/bundle/vim-easy-align
68
+ force : yes
64
69
65
70
- name : clone vim-ShowTrailingWhitespace to ~/.vim/bundle/
66
71
git :
Original file line number Diff line number Diff line change 8
8
homebrew :
9
9
name : direnv
10
10
state : latest
11
+
12
+ - name : ensure ~/.bash_profile exists
13
+ file :
14
+ path : " /Users/{{ ansible_user_id }}/.bash_profile"
15
+ state : touch
16
+ mode : 0755
17
+ owner : " {{ ansible_user_id }}"
18
+ group : " {{ ansible_user_gid }}"
You can’t perform that action at this time.
0 commit comments