--- - hosts: localhost tasks: - name: Install homebrew include_role: name: geerlingguy.mac.homebrew - 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: name: [ homebrew/cask-versions, ] - name: Install core packages via brew casks community.general.homebrew_cask: name: "{{ item }}" ignore_errors: yes with_items: - dropbox - google-chrome - iterm2 - kindle - slack - sublime-text - zoom - discord - moom - signal - spotify - whatsapp - alfred - kitty - name: "Install homebrew packages" community.general.homebrew: name: [ 'awscli', 'curl', 'fzf', 'postgresql', 'readline', 'redis', 'sqlite3', 'tmux', 'nvim', 'mas', 'bat', 'fish', 'neovim', 'gh', 'yarn', ] state: present update_homebrew: yes - git: repo: https://github.com/asdf-vm/asdf.git dest: "/Users/{{ lookup('env', 'USER') }}/.asdf" version: v0.8.1 - name: "Create a default asdf configuration" template: src: templates/.asdfrc.j2 dest: /Users/{{ lookup('env', 'USER') }}/.asdfrc owner: "{{ lookup('env', 'USER') }}" force: yes - name: "Install asdf plugins" shell: | source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh asdf plugin-add {{ item }} || exit 0 with_items: - nodejs - python - rust - name: "Install Default Python" shell: | source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh asdf install python 3.10.1 asdf global python 3.10.1 pip3 install ansible asdf reshim python - name: "Install default Rust" shell: | source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh asdf install rust 1.58.1 asdf global rust 1.58.1 asdf reshim rust - 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 17.4.0 asdf global nodejs 17.4.0 - name: Install yarn packages shell: yarn global add {{ item }} with_items: - create-react-app - name: re-generate bins now we've installed some yarn packages shell: asdf reshim nodejs