---
# cask playbook

- name: "Tap Homebrew repos"
  homebrew_tap: name={{item}} state=present
  with_items: casks.taps

- name: "update Homebrew"
  homebrew: update_homebrew=yes

- name: "install cask package"
  homebrew: name=brew-cask state=latest

- name: "Install Casks"
  homebrew_cask: name={{item}} state=installed
  environment:
    HOMEBREW_CASK_OPTS: "--appdir=/Applications"
  with_items: casks.packages

---
# cask playbook

- name: "Tap Homebrew repos"
  homebrew_tap: name={{item}} state=present
  with_items: casks.taps

- name: "update Homebrew"
  homebrew: update_homebrew=yes

- name: "install cask package"
  homebrew: name=brew-cask state=latest
  sudo: true

- name: "Install Casks"
  homebrew_cask: name={{item}} state=installed
  environment:
    HOMEBREW_CASK_OPTS: "--appdir=/Applications"
  with_items: casks.packages

- name: "Set permissions"
  file: path=/opt owner={{install_user}} group=staff state=touch

Add sudo to cask install
Add sudo to cask install

Signed-off-by: Simon Thulbourn <a35c15f375c4f69af4708338068f3913eefbe66d@thulbourn.com>
