adds: updates following latest big sur re-install

This commit is contained in:
Ben Dixon
2021-01-01 12:00:47 +08:00
parent 8197fc33d2
commit 404950bba8
8 changed files with 153 additions and 81 deletions

View File

@@ -10,10 +10,14 @@ Install Ansible
```
sudo easy_install pip
sudo pip install ansible
sudo pip install --ignore-installed ansible
```
Get community.general collection:
```
ansible-galaxy install -r requirements.yml
```
To run playbook:
@@ -26,3 +30,9 @@ You can run a role directly with:
```
ansible localhost -m include_role -a name=dnsmasq --ask-become-pass
```
## Structure
-

View File

@@ -2,28 +2,31 @@
- hosts: localhost
tasks:
- name: Install homebrew
shell: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
include_role:
name: geerlingguy.homebrew
- name: Setup dnsmasq
include_role: dnsmasq
become: true
include_role:
name: dnsmasq
- name: 'add custom homebrew repos'
homebrew_tap:
community.general.homebrew_tap:
name: [
heroku/brew,
thoughtbot/formulae,
caskroom/versions,
adoptopenjdk/openjdk,
fishtown-analytics/dbt,
heroku/brew,
homebrew/cask-versions,
thoughtbot/formulae,
weaveworks/tap,
fishtown-analytics/dbt
]
- name: Install core packages via brew casks
homebrew_cask: name={{ item }} state=present
community.general.homebrew_cask:
name: "{{ item }}"
ignore_errors: yes
with_items:
- 1password
- adoptopenjdk/openjdk/adoptopenjdk8
- android-sdk
- android-studio
- dash
@@ -34,7 +37,6 @@
- google-cloud-sdk
- graphql-playground
- iterm2
- adoptopenjdk/openjdk/adoptopenjdk8
- kindle
- microsoft-office
- ngrok
@@ -45,6 +47,7 @@
- sketch
- slack
- sublime-text
- telegram
- tunnelblick
- vagrant
- virtualbox
@@ -54,15 +57,15 @@
- zoomus
- name: "Install homebrew packages"
homebrew:
community.general.homebrew:
name: [
'autoconf',
'automake',
'awscli',
'aws-iam-authenticator',
'awscli',
'coreutils',
'curl',
'dbt',
'dbt@0.18.0',
'direnv',
'dnsmasq',
'erlang',
@@ -70,6 +73,7 @@
'gnu-time',
'gpg',
'heroku',
'htop',
'imagemagick@6',
'kubectx',
'kubernetes-cli',
@@ -88,8 +92,8 @@
'redis',
'sqlite3',
'sshfs',
'tmux',
'terraform',
'tmux',
'unixodbc',
'unzip',
'vim',
@@ -97,8 +101,8 @@
'weaveworks/tap/eksctl',
'xz',
'yarn',
'zsh',
'zlib',
'zsh',
]
state: present
update_homebrew: yes
@@ -111,35 +115,6 @@
dest: "/Users/{{ lookup('env', 'USER') }}/.asdf"
version: v0.7.1
- name: Install Addroid SDKs etc
shell: yes | sdkmanager "{{ item }}" --sdk_root=/Users/{{ lookup('env', 'USER') }}/Library/Android/sdk
with_items:
- "add-ons;addon-google_apis-google-21"
- "add-ons;addon-google_apis-google-22"
- "add-ons;addon-google_apis-google-23"
- "build-tools;23.0.1"
- "build-tools;23.0.3"
- "build-tools;25.0.2"
- "build-tools;25.0.3"
- "build-tools;26.0.0"
- "build-tools;26.0.1"
- "build-tools;26.0.2"
- "build-tools;26.0.3"
- "build-tools;27.0.3"
- "build-tools;28.0.3"
- "extras;android;m2repository"
- "extras;google;google_play_services"
- "extras;google;m2repository"
- "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.1"
- "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"
- "platforms;android-23"
- "platforms;android-25"
- "platforms;android-26"
- "platforms;android-27"
- "platforms;android-28"
- "system-images;android-23;google_apis;x86"
- "system-images;android-26;google_apis;x86"
- name: Get the path to ZSH
become: false
local_action: command which zsh
@@ -174,6 +149,35 @@
owner: "{{ lookup('env', 'USER') }}"
force: yes
- name: Create a default VSCode configuration
template:
src: templates/vscode-settings.json.j2
dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/settings.json
owner: "{{ lookup('env', 'USER') }}"
force: no
- name: Install VSCode extensions
shell: code --install-extension {{ item }}
with_items:
- apollographql.vscode-apollo
- bradlc.vscode-tailwindcss
- castwide.solargraph
- clinyong.vscode-css-modules
- eamodio.gitlens
- jakebecker.elixir-ls
- kaiwood.endwise
- karunamurti.haml
- ms-vscode-remote.vscode-remote-extensionpack
- ms-vscode.vscode-typescript-tslint-plugin
- msjsdiag.debugger-for-chrome
- rebornix.ruby
- Tyriar.sort-lines
- vscodevim.vim
- vscoss.vscode-ansible
- wholroyd.jinja
- wingrunr21.vscode-ruby
- xabikos.javascriptsnippets
- name: "Install asdf plugins"
shell: |
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
@@ -183,6 +187,7 @@
- elixir
- nodejs
- python
- erlang
- name: "Install Default Python"
shell: |
@@ -194,7 +199,7 @@
asdf global python 3.7.3
pip3 install boto
pip3 install ansible
pip3 install jupyterlab
pip3 install jupyterlab`
pip3 isntall numpy
pip3 install scipy
pip3 install matplotlib
@@ -209,27 +214,28 @@
- name: "Install Default Ruby"
shell: |
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
asdf install ruby 2.4.2
asdf global ruby 2.4.2
gem install bundler -v 1.17.3
asdf install ruby 3.0.0
asdf install ruby 2.7.2
asdf global ruby 3.0.0
gem install bundler -v 2.2.4
gem install cocoapods
gem install rubocop
gem install solargraph
- name: "Install default node"
shell: |
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
bash /Users/{{ lookup('env', 'USER') }}/.asdf/plugins/nodejs/bin/import-release-team-keyring
asdf install nodejs 11.11.0
asdf install nodejs 10.8.0
asdf install nodejs 9.11.1
asdf global nodejs 11.11.0
asdf install nodejs 14.15.3
asdf global nodejs 14.15.3
- name: "Install default elixir"
shell: |
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
asdf install elixir 1.6
asdf install elixir 1.9.1
asdf global elixir 1.9.1
mix archive.install hex phx_new 1.4.9 --force
asdf install elixir 1.11.2
asdf global elixir 1.11.2
mix local.hex --force
mix archive.install hex phx_new 1.5.7 --force
- name: Install yarn packages
shell: yarn global add {{ item }} --prefix /usr/local
@@ -240,25 +246,31 @@
- generator-generator
- yo
- name: Install VSCode extensions
shell: code --install-extension {{ item }}
- name: Install Addroid SDKs etc
shell: yes | sdkmanager "{{ item }}" --sdk_root=/Users/{{ lookup('env', 'USER') }}/Library/Android/sdk
with_items:
- apollographql.vscode-apollo
- clinyong.vscode-css-modules
- eamodio.gitlens
- kaiwood.endwise
- karunamurti.haml
- ms-vscode.vscode-typescript-tslint-plugin
- PeterJausovec.vscode-docker
- peterjausovec.vscode-docker
- rebornix.ruby
- Tyriar.sort-lines
- vscoss.vscode-ansible
- name: Create a default VSCode configuration
template:
src: templates/vscode-settings.json.j2
dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/settings.json
owner: "{{ lookup('env', 'USER') }}"
force: no
- "add-ons;addon-google_apis-google-21"
- "add-ons;addon-google_apis-google-22"
- "add-ons;addon-google_apis-google-23"
- "build-tools;23.0.1"
- "build-tools;23.0.3"
- "build-tools;25.0.2"
- "build-tools;25.0.3"
- "build-tools;26.0.0"
- "build-tools;26.0.1"
- "build-tools;26.0.2"
- "build-tools;26.0.3"
- "build-tools;27.0.3"
- "build-tools;28.0.3"
- "extras;android;m2repository"
- "extras;google;google_play_services"
- "extras;google;m2repository"
- "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.1"
- "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"
- "platforms;android-23"
- "platforms;android-25"
- "platforms;android-26"
- "platforms;android-27"
- "platforms;android-28"
- "system-images;android-23;google_apis;x86"
- "system-images;android-26;google_apis;x86"

View File

7
bin/bootstrap Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
sudo xcodebuild -license
sudo easy_install pip
sudo pip install --ignore-installed ansible
ansible-galaxy install -r requirements.yml
ansible-playbook -i "localhost," -c local ansible_osx.yml --ask-become-pass

7
requirements.yml Normal file
View File

@@ -0,0 +1,7 @@
---
roles:
- name: geerlingguy.homebrew
collections:
- name: https://github.com/ansible-collections/community.general.git
type: git
version: main

View File

@@ -1,5 +1,5 @@
- name: "Install homebrew packages"
homebrew:
community.general.homebrew:
name: [ dnsmasq ]
state: present
update_homebrew: true

View File

@@ -19,6 +19,7 @@ export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(git kubectl)
DISABLE_UNTRACKED_FILES_DIRTY="true"
ZSH_DISABLE_COMPFIX=true
# Load personal pre oh-my-zsh init config which should be stored in ~/.zshrc.personal.before
# E.g. setting ZSH theme etc

View File

@@ -3,5 +3,40 @@
"ruby.codeCompletion": "rcodetools",
"ruby.format": "rubocop",
"ruby.useLanguageServer": true,
"editor.tabSize": 2
"window.zoomLevel": 2,
"editor.minimap.enabled": false,
"editor.tabSize": 2,
"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.tsserver.log": "verbose",
"diffEditor.ignoreTrimWhitespace": false,
"explorer.confirmDragAndDrop": false,
"breadcrumbs.enabled": false,
"elixirLS.fetchDeps": false,
"workbench.activityBar.visible": true,
"workbench.statusBar.visible": true,
"gitlens.menus": {
"editor": false,
"editorGroup": false,
"editorTab": false,
"explorer": false,
"scmGroup": false,
"scmItem": false
},
"workbench.sideBar.location": "left",
"workbench.editor.closeEmptyGroups": false,
"zenMode.hideTabs": false,
"zenMode.fullScreen": false,
"workbench.editor.revealIfOpen": true,
"window.title": "${activeEditorLong}${separator}${rootName}",
"zenMode.hideLineNumbers": false,
"editor.lineNumbers": "relative",
"workbench.editor.showTabs": true,
"workbench.editor.labelFormat": "short",
"terminal.integrated.allowChords": false,
"cSpell.language": "en-GB",
"files.associations": {
"*.leex": "html-eex",
"*.html.leex": "html-eex"
},
"path-autocomplete.triggerOutsideStrings": true,
}