adds: m1 compatibility
This commit is contained in:
121
ansible_osx.yml
121
ansible_osx.yml
@@ -3,11 +3,15 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Install homebrew
|
- name: Install homebrew
|
||||||
include_role:
|
include_role:
|
||||||
name: geerlingguy.homebrew
|
name: geerlingguy.mac.homebrew
|
||||||
|
|
||||||
- name: Setup dnsmasq
|
- name: Make sure homebrew bin is in path
|
||||||
include_role:
|
ansible.builtin.lineinfile:
|
||||||
name: dnsmasq
|
path: /etc/paths
|
||||||
|
state: present
|
||||||
|
line: '/opt/homebrew/bin'
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
- name: 'add custom homebrew repos'
|
- name: 'add custom homebrew repos'
|
||||||
community.general.homebrew_tap:
|
community.general.homebrew_tap:
|
||||||
@@ -26,35 +30,24 @@
|
|||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
with_items:
|
with_items:
|
||||||
- 1password
|
- 1password
|
||||||
- adoptopenjdk/openjdk/adoptopenjdk8
|
|
||||||
- android-sdk
|
- android-sdk
|
||||||
- android-studio
|
- android-studio
|
||||||
- dash
|
|
||||||
- datagrip
|
- datagrip
|
||||||
- docker
|
- docker
|
||||||
- dropbox
|
- dropbox
|
||||||
|
- figma
|
||||||
- google-chrome
|
- google-chrome
|
||||||
- google-cloud-sdk
|
- google-cloud-sdk
|
||||||
- graphql-playground
|
|
||||||
- iterm2
|
- iterm2
|
||||||
- kindle
|
- kindle
|
||||||
- microsoft-office
|
|
||||||
- ngrok
|
- ngrok
|
||||||
- osxfuse
|
|
||||||
- postico
|
|
||||||
- postman
|
|
||||||
- rstudio
|
|
||||||
- sketch
|
|
||||||
- slack
|
- slack
|
||||||
- sublime-text
|
- sublime-text
|
||||||
- telegram
|
- telegram
|
||||||
- tunnelblick
|
|
||||||
- vagrant
|
|
||||||
- virtualbox
|
|
||||||
- visual-studio-code
|
- visual-studio-code
|
||||||
- vlc
|
- vlc
|
||||||
- zeplin
|
- zoom
|
||||||
- zoomus
|
- tuple
|
||||||
|
|
||||||
- name: "Install homebrew packages"
|
- name: "Install homebrew packages"
|
||||||
community.general.homebrew:
|
community.general.homebrew:
|
||||||
@@ -69,7 +62,6 @@
|
|||||||
'dbt@0.18.0',
|
'dbt@0.18.0',
|
||||||
'direnv',
|
'direnv',
|
||||||
'dnsmasq',
|
'dnsmasq',
|
||||||
'erlang',
|
|
||||||
'fzf',
|
'fzf',
|
||||||
'gnu-time',
|
'gnu-time',
|
||||||
'gpg',
|
'gpg',
|
||||||
@@ -83,23 +75,18 @@
|
|||||||
'libxslt',
|
'libxslt',
|
||||||
'libyaml',
|
'libyaml',
|
||||||
'mas',
|
'mas',
|
||||||
'mysql',
|
|
||||||
'openssl' ,
|
'openssl' ,
|
||||||
'pkg-config',
|
'pkg-config',
|
||||||
'postgresql',
|
'postgresql',
|
||||||
'r',
|
|
||||||
'rcm',
|
'rcm',
|
||||||
'readline',
|
'readline',
|
||||||
'redis',
|
'redis',
|
||||||
'sqlite3',
|
'sqlite3',
|
||||||
'sshfs',
|
|
||||||
'terraform',
|
|
||||||
'tmux',
|
'tmux',
|
||||||
'unixodbc',
|
'unixodbc',
|
||||||
'unzip',
|
'unzip',
|
||||||
'vim',
|
'vim',
|
||||||
'watchman',
|
'watchman',
|
||||||
'weaveworks/tap/eksctl',
|
|
||||||
'xz',
|
'xz',
|
||||||
'yarn',
|
'yarn',
|
||||||
'zlib',
|
'zlib',
|
||||||
@@ -108,8 +95,10 @@
|
|||||||
state: present
|
state: present
|
||||||
update_homebrew: yes
|
update_homebrew: yes
|
||||||
|
|
||||||
- name: "Link ImageMagick6 as main version (for rmagick gem)"
|
- name: "Install from Mac app store"
|
||||||
shell: brew link -f imagemagick@6
|
shell: mas install {{ item }}
|
||||||
|
with_items:
|
||||||
|
- 497799835 # xcode
|
||||||
|
|
||||||
- name: Get the path to ZSH
|
- name: Get the path to ZSH
|
||||||
become: false
|
become: false
|
||||||
@@ -143,15 +132,16 @@
|
|||||||
src: templates/vscode-settings.json.j2
|
src: templates/vscode-settings.json.j2
|
||||||
dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/settings.json
|
dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/settings.json
|
||||||
owner: "{{ lookup('env', 'USER') }}"
|
owner: "{{ lookup('env', 'USER') }}"
|
||||||
force: no
|
force: yes
|
||||||
|
|
||||||
- name: Create a default VSCode keuybinding configuration
|
- name: Create a default VSCode keuybinding configuration
|
||||||
template:
|
template:
|
||||||
src: templates/vscode-keybindings.json.j2
|
src: templates/vscode-keybindings.json.j2
|
||||||
dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/keybindings.json
|
dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/keybindings.json
|
||||||
owner: "{{ lookup('env', 'USER') }}"
|
owner: "{{ lookup('env', 'USER') }}"
|
||||||
force: no
|
force: yes
|
||||||
|
|
||||||
|
# Add something which ensures path is set here
|
||||||
- name: Install VSCode extensions
|
- name: Install VSCode extensions
|
||||||
shell: code --install-extension {{ item }}
|
shell: code --install-extension {{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
@@ -170,7 +160,6 @@
|
|||||||
- richie5um2.vscode-sort-json
|
- richie5um2.vscode-sort-json
|
||||||
- Tyriar.sort-lines
|
- Tyriar.sort-lines
|
||||||
- vscodevim.vim
|
- vscodevim.vim
|
||||||
- vscoss.vscode-ansible
|
|
||||||
- wholroyd.jinja
|
- wholroyd.jinja
|
||||||
- wingrunr21.vscode-ruby
|
- wingrunr21.vscode-ruby
|
||||||
- xabikos.javascriptsnippets
|
- xabikos.javascriptsnippets
|
||||||
@@ -180,7 +169,7 @@
|
|||||||
- git:
|
- git:
|
||||||
repo: https://github.com/asdf-vm/asdf.git
|
repo: https://github.com/asdf-vm/asdf.git
|
||||||
dest: "/Users/{{ lookup('env', 'USER') }}/.asdf"
|
dest: "/Users/{{ lookup('env', 'USER') }}/.asdf"
|
||||||
version: v0.7.1
|
version: v0.8.1
|
||||||
|
|
||||||
- name: "Create a default asdf configuration"
|
- name: "Create a default asdf configuration"
|
||||||
template:
|
template:
|
||||||
@@ -203,29 +192,17 @@
|
|||||||
- name: "Install Default Python"
|
- name: "Install Default Python"
|
||||||
shell: |
|
shell: |
|
||||||
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
||||||
asdf install python 3.9.1
|
asdf install python 3.10.0
|
||||||
asdf global python 3.9.1
|
asdf global python 3.10.0
|
||||||
pip3 install boto
|
|
||||||
pip3 install ansible
|
pip3 install ansible
|
||||||
pip3 install jupyterlab
|
|
||||||
pip3 isntall numpy
|
|
||||||
pip3 install scipy
|
|
||||||
pip3 install matplotlib
|
|
||||||
pip3 install ipython
|
|
||||||
pip3 install jupyter
|
|
||||||
pip3 install pandas
|
|
||||||
pip3 install sympy
|
|
||||||
pip3 install nose
|
|
||||||
pip3 install scikit-learn
|
|
||||||
asdf reshim python
|
asdf reshim python
|
||||||
|
|
||||||
- name: "Install Default Ruby"
|
- name: "Install Default Ruby"
|
||||||
shell: |
|
shell: |
|
||||||
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
||||||
asdf install ruby 3.0.0
|
asdf install ruby 3.0.2
|
||||||
asdf install ruby 2.7.2
|
asdf global ruby 3.0.2
|
||||||
asdf global ruby 3.0.0
|
gem install bundler
|
||||||
gem install bundler -v 2.2.4
|
|
||||||
gem install cocoapods
|
gem install cocoapods
|
||||||
gem install rubocop
|
gem install rubocop
|
||||||
gem install solargraph
|
gem install solargraph
|
||||||
@@ -234,19 +211,25 @@
|
|||||||
shell: |
|
shell: |
|
||||||
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
||||||
bash /Users/{{ lookup('env', 'USER') }}/.asdf/plugins/nodejs/bin/import-release-team-keyring
|
bash /Users/{{ lookup('env', 'USER') }}/.asdf/plugins/nodejs/bin/import-release-team-keyring
|
||||||
asdf install nodejs 14.15.3
|
asdf install nodejs 16.4.2
|
||||||
asdf global nodejs 14.15.3
|
asdf global nodejs 16.4.2
|
||||||
|
|
||||||
|
- name: "Install default erlang"
|
||||||
|
shell: |
|
||||||
|
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
||||||
|
asdf install erlang 24.0.2
|
||||||
|
asdf global erlang 24.0.2
|
||||||
|
|
||||||
|
|
||||||
- name: "Install default elixir"
|
- name: "Install default elixir"
|
||||||
shell: |
|
shell: |
|
||||||
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
||||||
asdf install elixir 1.11.2
|
asdf install elixir 1.12.3-otp-24
|
||||||
asdf global elixir 1.11.2
|
asdf global elixir 1.12.3-otp-24
|
||||||
mix local.hex --force
|
mix local.hex --force
|
||||||
mix archive.install hex phx_new 1.5.7 --force
|
|
||||||
|
|
||||||
- name: Install yarn packages
|
- name: Install yarn packages
|
||||||
shell: yarn global add {{ item }} --prefix /usr/local
|
shell: yarn global add {{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- react-native-cli
|
- react-native-cli
|
||||||
- create-react-app
|
- create-react-app
|
||||||
@@ -254,31 +237,7 @@
|
|||||||
- generator-generator
|
- generator-generator
|
||||||
- yo
|
- yo
|
||||||
|
|
||||||
- name: Install Addroid SDKs etc
|
- name: re-generate bins now we've installed some yarn packages
|
||||||
shell: yes | sdkmanager "{{ item }}" --sdk_root=/Users/{{ lookup('env', 'USER') }}/Library/Android/sdk
|
shell: asdf reshim nodejs
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
sudo xcodebuild -license
|
sudo xcodebuild -license
|
||||||
sudo easy_install pip
|
/usr/sbin/softwareupdate --install-rosetta
|
||||||
pip install --ignore-installed ansible
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
|
python3 get-pip.py
|
||||||
|
sudo pip3 install --ignore-installed ansible
|
||||||
ansible-galaxy install -r requirements.yml
|
ansible-galaxy install -r requirements.yml
|
||||||
|
|
||||||
ansible-playbook -i "localhost," -c local ansible_osx.yml --ask-become-pass
|
ansible-playbook -i "localhost," -c local ansible_osx.yml --ask-become-pass
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
roles:
|
|
||||||
- name: geerlingguy.homebrew
|
|
||||||
collections:
|
collections:
|
||||||
- name: https://github.com/ansible-collections/community.general.git
|
- name: https://github.com/ansible-collections/community.general.git
|
||||||
type: git
|
type: git
|
||||||
version: main
|
version: main
|
||||||
|
- name: geerlingguy.mac
|
||||||
@@ -7,12 +7,13 @@ export PATH=${PATH}:${ANDROID_HOME}/tools
|
|||||||
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
|
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
|
||||||
export PATH=/usr/local/opt/imagemagick@6/bin:${PATH}
|
export PATH=/usr/local/opt/imagemagick@6/bin:${PATH}
|
||||||
|
|
||||||
# For compilers to find zlib you may need to set:
|
export optflags="-Wno-error=implicit-function-declaration"
|
||||||
export LDFLAGS="${LDFLAGS} -L/usr/local/opt/zlib/lib"
|
export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"
|
||||||
export CPPFLAGS="${CPPFLAGS} -I/usr/local/opt/zlib/include"
|
export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"
|
||||||
|
export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"
|
||||||
|
|
||||||
# For pkg-config to find zlib you may need to set:
|
# For pkg-config to find zlib you may need to set:
|
||||||
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH} /usr/local/opt/zlib/lib/pkgconfig"
|
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH} /opt/homebrew/opt/zlib/lib/pkgconfig"
|
||||||
|
|
||||||
# ZSH setup
|
# ZSH setup
|
||||||
export ZSH=$HOME/.oh-my-zsh
|
export ZSH=$HOME/.oh-my-zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user