-
Notifications
You must be signed in to change notification settings - Fork 163
/
brew.yml
65 lines (52 loc) · 1.63 KB
/
brew.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
#
# Updates all packages for macos-based distributions
#
- name: Check for xcode-tools
raw: xcode-select --print-path &> /dev/null
register: xcode
ignore_errors: yes
check_mode: no
- name: Install xcode-tools
script: files/install-xcode.sh
when: xcode.rc > 1
- name: Check if Homebrew is already installed (Apple Silicon)
stat:
path: /opt/homebrew/bin/brew
register: armbrew
when: os == "macos11.0"
- name: Check if Homebrew is already installed
stat:
path: /usr/local/bin/brew
register: brew
when: os != "macos11.0"
- name: Install Homebrew
become_user: "{{ ansible_user }}"
script: files/install-homebrew.sh
when: os != "macos11.0" and not brew.stat.exists
- name: Install Homebrew
become_user: "{{ ansible_user }}"
script: files/install-homebrew.sh
when: os == "macos11.0" and not armbrew.stat.exists
- name: Upgrade installed packages
become_user: "{{ ansible_user }}"
homebrew:
upgrade_all: yes
- name: Install brew cu
become_user: "{{ ansible_user }}"
homebrew_tap:
name: buo/cask-upgrade
- name: Install brew cask-versions
become_user: "{{ ansible_user }}"
homebrew_tap:
name: homebrew/cask-versions
- name: Update Casks
become_user: "{{ ansible_user }}"
homebrew_cask:
upgrade_all: yes
- name: Disable Crash Reporter 1
become_user: root
command: launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
- name: Disable Crash Reporter 2
become_user: root
command: launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist