Skip to content

Commit 51c236c

Browse files
Feature/mac updates (#32)
* fix pyenv on mac, add coreutils to bootstrap * ignore privs app check errors * re-add k9s, fix some weirdness, update gitconfig to include pull block Co-authored-by: Dave <dave.benedic@insight.com>
1 parent b3e18e0 commit 51c236c

File tree

5 files changed

+39
-19
lines changed

5 files changed

+39
-19
lines changed

roles/bootstrap/tasks/darwin.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
path: /usr/local/homebrew
3737
register: homebrew
3838

39-
- shell: rm -rf /usr/local/homebrew
39+
- name: rm -rf /usr/local/homebrew
40+
file:
41+
path: /usr/local/homebrew
42+
state: absent
4043
when: homebrew.stat.exists
4144
become: yes
4245

@@ -51,6 +54,19 @@
5154

5255
- shell: cd /usr/local/src && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /usr/local/homebrew
5356

57+
- name: check if man8 file exists
58+
stat:
59+
path: /usr/local/share/man/man8
60+
register: man8
61+
ignore_errors: yes
62+
63+
- name: change ownership on man8
64+
file:
65+
path: /usr/local/share/man/man8
66+
owner: "{{ ansible_user_id }}"
67+
when: man8.stat.exists
68+
become: yes
69+
5470
- name: add homebrew binaries to path
5571
copy:
5672
dest: "/Users/{{ ansible_user_id }}/.profile"
@@ -60,6 +76,11 @@
6076
homebrew:
6177
update_homebrew: yes
6278

79+
- name: install coreutils
80+
homebrew:
81+
name: coreutils
82+
state: latest
83+
6384
- name: install jq
6485
homebrew:
6586
name: jq

roles/git/templates/gitconfig.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
pager = cat
3636
[push]
3737
default = upstream
38+
[pull]
39+
rebase = false

roles/misc/tasks/darwin.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
name: kubernetes-cli
2323
state: latest
2424

25-
#- name: install k9s
26-
# homebrew:
27-
# name: derailed/k9s/k9s
28-
# state: latest
25+
- name: install k9s
26+
homebrew:
27+
name: k9s
28+
state: latest
2929

3030
- name: install kubectx
3131
homebrew:
@@ -45,6 +45,7 @@
4545
- name: check if privileges cli app is installed (corporate nanny)
4646
command: /Applications/Privileges.app/Contents/Resources/PrivilegesCLI --help
4747
register: privs_install_check
48+
ignore_errors: yes
4849

4950
- name: add privileges app alias
5051
lineinfile:

roles/python/tasks/darwin.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
#- name: shim pyenv into ~/.profile
3-
# lineinfile:
4-
# path: "/Users/{{ ansible_user_id }}/.profile"
5-
# line: "export PATH=${PATH}:$(pyenv root)/shims"
6-
# regexp: "^export PATH=${PATH}"
7-
#
8-
#- name: Add pyenv to .profile
9-
# lineinfile:
10-
# dest: "/Users/{{ ansible_user_id }}/.profile"
11-
# line: 'eval "$(pyenv init -)"'
2+
- name: shim pyenv into ~/.profile
3+
lineinfile:
4+
path: "/Users/{{ ansible_user_id }}/.profile"
5+
line: "export PATH=${PATH}:$(pyenv root)/shims"
6+
regexp: "^export PATH=${PATH}"
7+
8+
- name: Add pyenv to .profile
9+
lineinfile:
10+
dest: "/Users/{{ ansible_user_id }}/.profile"
11+
line: 'eval "$(pyenv init -)"'
1212

1313
# NOTE: CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install 3.7.3
1414
# If you're getting compilation errors caused by xcode cli tools

roles/term/tasks/darwin.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
---
2-
- name: install iterm2
3-
shell: brew cask install iterm2
4-
ignore_errors: yes
5-
62
- name: install zsh syntax highlighting
73
homebrew:
84
name: zsh-syntax-highlighting

0 commit comments

Comments
 (0)