Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions roles/homebrew/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ Packages you would like to make sure are _uninstalled_.

Whether to upgrade homebrew and all packages installed by homebrew. If you prefer to manually update packages via `brew` commands, leave this set to `false`.


homebrew_cask_upgrade_all_packages: false

Whether to upgrade homebrew and all cask applications installed by homebrew. If you prefer to manually update packages via `brew` commands, leave this set to `false`.

homebrew_taps:
- { name: my_company/internal_tap, url: 'https://example.com/path/to/tap.git' }

Expand Down
1 change: 1 addition & 0 deletions roles/homebrew/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ homebrew_installed_packages: []
homebrew_uninstalled_packages: []

homebrew_upgrade_all_packages: false
homebrew_cask_upgrade_all_packages: false

homebrew_taps: []

Expand Down
12 changes: 12 additions & 0 deletions roles/homebrew/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@
notify:
- Clear homebrew cache

- name: Upgrade all cask applications (if configured).
homebrew_cask:
install_options: "{{ item.install_options | default('appdir=' + homebrew_cask_appdir) }}"
accept_external_apps: "{{ homebrew_cask_accept_external_apps }}"
sudo_password: "{{ ansible_become_password | default(omit) }}"
update_homebrew: true
upgrade_all: true
greedy: true
when: homebrew_cask_upgrade_all_packages
notify:
- Clear homebrew cache

# Brew.
- name: Ensure blacklisted homebrew packages are not installed.
homebrew:
Expand Down
Loading