Skip to content

Commit 998917d

Browse files
daveybWalkingDisasterdbenedic-insight
authored
A release! (#34)
* cask is already included with homebrew, and pip3 required to run on my machine (#9) * Macos catalina (#10) * add alias for git log --graph * change glog format * add more mac os catalina fixes * update .profile * remove hub alias, add pyenv eval to profile instead of zshrc * add pre-commit support (#12) * add pre-commit support (#13) * add easy align plugin to vim (#14) * updates to support already installed enterprise apps (#16) * updates to support already installed enterprise apps * remove pyenv local version Co-authored-by: Dave <dave.benedic@insight.com> * add support for WSL, lint cleanup, README updates (#17) Co-authored-by: Dave <dave.benedic@insight.com> * WSL Fixes #1` (#18) * fix gh gpg, update fonts and zsh tasks * fix perms on git-credential-manager bin * update zsh to exec via bash_profile (#19) * set gh cli editor to vim (#21) * add direnv to misc role (#22) Co-authored-by: Dave Benedic <dave.benedic@insight.com> * move direnv into zsh role, make zsh exec idempotent (#23) Co-authored-by: Dave <dave.benedic@insight.com> * change vimrc to templated file, add WSL keybinding maps (#24) Co-authored-by: Dave <dave.benedic@insight.com> * add syntax settings for .hcl files (#25) Co-authored-by: Dave <dave.benedic@insight.com> * bug/homebrew dir (#27) * add privs, add gh cli * fix mac bugs, remove old software, add wsl defaults Co-authored-by: Dave <dave.benedic@insight.com> * add explicit pip3 on powerline install * feature/regular changes and fixes (#30) * change vim theme, working through ~/.profile issues in bootstrap * mac updates * Feature/regular changes and fixes (#31) * change vim theme, working through ~/.profile issues in bootstrap * mac updates Co-authored-by: Dave <dave.benedic@insight.com> * 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> * fix pyenv on mac, add coreutils to bootstrap (#33) Co-authored-by: Dave <dave.benedic@insight.com> Co-authored-by: Michael Meadows <michaelmeadows@gmail.com> Co-authored-by: Dave <dave.benedic@insight.com> Co-authored-by: Dave Benedic <59837728+dbenedic-insight@users.noreply.github.com>
1 parent 67975ce commit 998917d

File tree

10 files changed

+98
-15
lines changed

10 files changed

+98
-15
lines changed

roles/bootstrap/tasks/darwin.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,39 @@
3636
path: /usr/local/homebrew
3737
register: homebrew
3838

39+
- name: rm -rf /usr/local/homebrew
40+
file:
41+
path: /usr/local/homebrew
42+
state: absent
43+
when: homebrew.stat.exists
44+
become: yes
45+
46+
- name: ensure homebrew dir exists
47+
file:
48+
path: /usr/local/homebrew
49+
state: directory
50+
mode: 0755
51+
owner: "{{ ansible_user_id }}"
52+
group: "{{ ansible_user_gid }}"
53+
become: yes
54+
55+
- shell: cd /usr/local/src && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /usr/local/homebrew
56+
57+
- shell: sudo chown -R $(whoami) /usr/local/share/man/man8
58+
59+
- name: check if man8 file exists
60+
stat:
61+
path: /usr/local/share/man/man8
62+
register: man8
63+
ignore_errors: yes
64+
65+
- name: change ownership on man8
66+
file:
67+
path: /usr/local/share/man/man8
68+
owner: "{{ ansible_user_id }}"
69+
when: man8.stat.exists
70+
become: yes
71+
3972
- shell: rm -rf /usr/local/homebrew
4073
when: homebrew.stat.exists
4174
become: yes
@@ -54,12 +87,16 @@
5487
- name: add homebrew binaries to path
5588
copy:
5689
dest: "/Users/{{ ansible_user_id }}/.profile"
57-
content: PATH=$PATH:/usr/local/homebrew/bin
90+
content: export PATH=$PATH:/usr/local/homebrew/bin
5891

5992
- name: update homebrew
6093
homebrew:
6194
update_homebrew: yes
62-
upgrade_all: yes
95+
96+
- name: install coreutils
97+
homebrew:
98+
name: coreutils
99+
state: latest
63100

64101
- name: install jq
65102
homebrew:

roles/git/tasks/darwin.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,20 @@
1515
homebrew:
1616
name: pre-commit
1717
state: latest
18+
19+
# http://pre-commit.com
20+
- name: install pre-commit for git
21+
homebrew:
22+
name: pre-commit
23+
state: latest
24+
25+
# Manages HTTPS-based credentials (required for many SSO orgs)
26+
- name: install microsoft's git-credential-manager-core
27+
block:
28+
- name: tap microsoft git homebrew
29+
homebrew_tap:
30+
name: microsoft/git
31+
32+
- name: install cask
33+
homebrew_cask:
34+
name: git-credential-manager-core

roles/git/templates/gitconfig.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
helper = manager
44
useHttpPath = true
55
{% endif %}
6+
{% if ansible_system == "Darwin" %}
7+
[credential]
8+
helper = manager-core
9+
useHttpPath = true
10+
{% endif %}
611
[user]
712
name = {{ git_user }}
813
email = {{ git_email }}
@@ -30,3 +35,5 @@
3035
pager = cat
3136
[push]
3237
default = upstream
38+
[pull]
39+
rebase = false

roles/misc/tasks/darwin.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
- name: install k9s
2626
homebrew:
27-
name: derailed/k9s/k9s
27+
name: k9s
2828
state: latest
2929

3030
- name: install kubectx
@@ -45,9 +45,10 @@
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:
5152
dest: "~/.zshrc"
5253
line : alias privs=/Applications/Privileges.app/Contents/Resources/PrivilegesCLI
53-
when: privs_install_check.rc == 1
54+
when: privs_install_check.rc == 0

roles/python/tasks/darwin.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
---
2-
- name: install pyenv
3-
homebrew:
4-
name: pyenv
5-
state: latest
6-
72
- name: shim pyenv into ~/.profile
83
lineinfile:
94
path: "/Users/{{ ansible_user_id }}/.profile"

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

roles/vim/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,8 @@
7272
repo: https://github.com/inkarkat/vim-ShowTrailingWhitespace
7373
dest: ~/.vim/bundle/vim-ShowTrailingWhitespace
7474
version: "stable"
75+
76+
- name: clone colorscheme to ~/.vim/bundle/
77+
git:
78+
repo: https://github.com/morhetz/gruvbox.git
79+
dest: ~/.vim/bundle/gruvbox

roles/vim/templates/vimrc.j2

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ filetype plugin indent on
55

66
" editor settings
77
set nu
8-
set ts=2 sts=2 sw=2 expandtab
8+
set ts=2 sts=2 sw=2 expandtab
99
autocmd vimenter * NERDTree
1010
autocmd StdinReadPre * let s:std_in=1
1111
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
@@ -21,6 +21,21 @@ endfunction
2121
call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515')
2222
let g:NERDTreeNodeDelimiter = "\u00a0"
2323

24+
:set guicursor=n-v-c:blinkon0-block-Cursor/lCursor
25+
26+
" Use a line cursor within insert mode and a block cursor everywhere else.
27+
"
28+
" Reference chart of values:
29+
" Ps = 0 -> blinking block.
30+
" Ps = 1 -> blinking block (default).
31+
" Ps = 2 -> steady block.
32+
" Ps = 3 -> blinking underline.
33+
" Ps = 4 -> steady underline.
34+
" Ps = 5 -> blinking bar (xterm).
35+
" Ps = 6 -> steady bar (xterm).
36+
let &t_SI = "\e[6 q"
37+
let &t_EI = "\e[2 q"
38+
2439
" filetype settings
2540

2641
" plugins
@@ -62,3 +77,6 @@ highlight ShowTrailingWhitespace ctermbg=Red guibg=Red
6277
" WSL/Windows keybinding overrides
6378
:imap <silent> <C-v> <C-ALT-v>
6479
{% endif %}
80+
81+
" gruvbox
82+
autocmd vimenter * ++nested colorscheme gruvbox

roles/zsh/tasks/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
line: 'source ~/.profile'
2929
state: present
3030

31+
- name: Download theme
32+
get_url:
33+
url: "{{ zsh_theme_url }}"
34+
dest: "{{ local_omz_repo }}/themes/"
35+
when: zsh_theme_url != ""
36+
3137
- name: Set zsh theme
3238
lineinfile:
3339
dest: "~/.zshrc"

roles/zsh/vars/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
omz_repo: 'https://github.com/robbyrussell/oh-my-zsh.git'
33
local_omz_repo: "~/.oh-my-zsh"
4-
zsh_theme: 'agnoster'
4+
zsh_theme: 'minimal_improved'
5+
zsh_theme_url: 'https://raw.githubusercontent.com/gdsrosa/minimal_improved/master/minimal_improved.zsh-theme'

0 commit comments

Comments
 (0)