2017-10-12 22:28:35 +01:00
|
|
|
# Install Homebrew
|
|
|
|
- name: Check for Homebrew
|
2017-11-24 18:42:08 +00:00
|
|
|
tags:
|
|
|
|
- install
|
2017-10-12 22:28:35 +01:00
|
|
|
stat:
|
|
|
|
path: /usr/local/bin/brew
|
|
|
|
register: st
|
|
|
|
|
|
|
|
- name: Install Homebrew
|
2017-11-24 18:42:08 +00:00
|
|
|
tags:
|
|
|
|
- install
|
2017-10-12 22:28:35 +01:00
|
|
|
command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
|
|
|
when: st.stat.executable != True
|
|
|
|
|
|
|
|
- name: Disable Homebrew analytics
|
|
|
|
command: brew analytics off
|
|
|
|
|
|
|
|
# Taps
|
|
|
|
- name: Install Homebrew Taps
|
2017-11-24 18:42:08 +00:00
|
|
|
tags:
|
|
|
|
- install
|
2017-10-12 22:28:35 +01:00
|
|
|
homebrew_tap:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
2019-01-20 10:51:09 +00:00
|
|
|
loop: "{{ homebrew_tap_items }}"
|
2017-10-12 22:28:35 +01:00
|
|
|
|
|
|
|
# Update and upgrades
|
|
|
|
- name: Homebrew update and upgrades
|
2017-11-24 18:42:08 +00:00
|
|
|
tags:
|
|
|
|
- install
|
2017-10-12 22:28:35 +01:00
|
|
|
homebrew:
|
|
|
|
update_homebrew: True
|
|
|
|
upgrade_all: True
|
|
|
|
|
|
|
|
# Brews
|
|
|
|
- name: Install Homebrew Brews
|
2017-11-24 18:42:08 +00:00
|
|
|
tags:
|
|
|
|
- install
|
2017-10-12 22:28:35 +01:00
|
|
|
homebrew:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
2019-01-20 10:51:09 +00:00
|
|
|
loop: "{{ homebrew_brew_items }}"
|
2017-10-12 22:28:35 +01:00
|
|
|
|
|
|
|
# Casks
|
|
|
|
- name: Install Homebrew Casks
|
2017-11-24 18:42:08 +00:00
|
|
|
tags:
|
|
|
|
- install
|
2017-10-12 22:28:35 +01:00
|
|
|
homebrew_cask:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
2019-01-20 10:51:09 +00:00
|
|
|
loop: "{{ homebrew_cask_items }}"
|