-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from osxc/cask
Install Homebrew Cask (as an option)
- Loading branch information
Showing
7 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ galaxy_info: | |
- development | ||
- packaging | ||
- system | ||
dependencies: [] | ||
dependencies: | ||
- src: osxc.common-env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
- name: assert cask presence | ||
stat: path={{ install_dir }}/bin/brew-cask.rb | ||
register: cask_installed | ||
|
||
- name: tap the cask repository | ||
homebrew_tap: tap=caskroom/cask state=present | ||
when: cask_installed.stat.exists == false | ||
|
||
- name: install brew-cask | ||
homebrew: name=brew-cask state=latest update_homebrew=yes | ||
when: cask_installed.stat.exists == false | ||
|
||
- name: add new cask opts to common env | ||
lineinfile: dest=/Users/{{ item }}/.common_env | ||
regexp='^export HOMEBREW_CASK_OPTS' | ||
line='export HOMEBREW_CASK_OPTS="--appdir=/Applications"' | ||
state=present | ||
owner={{ item }} | ||
with_items: affected_users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ | |
|
||
- name: Update Homebrew | ||
homebrew: update_homebrew=yes | ||
|
||
- include: cask.yml | ||
when: install_cask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
clone_dir: "/Users/{{ ansible_user_id}}/src/github.com/Homebrew/homebrew" | ||
install_dir: "/Users/{{ ansible_user_id}}/brew" | ||
install_cask: yes | ||
affected_users: | ||
- "{{ ansible_user_id }}" |