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