---
- name: Install Heroku Toolbelt
  homebrew_cask: name=heroku-toolbelt state=installed

- name: Update Toolbelt
  shell: heroku update
  changed_when: no
  tags: update

- name: Create ~/.bin
  file: dest=~/.bin state=directory

- name: Link executables
  file: src={{ item }} dest=~/.bin/{{ item | basename }} state=link
  with_fileglob:
    - ./*

- name: Install plugins
  git: >
    repo=git://github.com/{{ item }}.git
    dest=~/.heroku/plugins/{{ item | basename }}
  with_items: dotfiles.heroku.plugin_repos
  tags: update

---
- name: Install Heroku Toolbelt
  shell: >-
    wget -qO- https://toolbelt.heroku.com/install.sh | sh
    creates=/usr/local/heroku/bin/heroku

- name: Update Toolbelt
  shell: heroku update
  changed_when: no
  tags: update

- name: Create ~/.bin
  file: dest=~/.bin state=directory

- name: Link executables
  file: src={{ item }} dest=~/.bin/{{ item | basename }} state=link
  with_fileglob:
    - ./*

- name: Install plugins
  git: >
    repo=git://github.com/{{ item }}.git
    dest=~/.heroku/plugins/{{ item | basename }}
  with_items: dotfiles.heroku.plugin_repos
  tags: update

Remove dependency on Homebrew Cask from Heroku role
Remove dependency on Homebrew Cask from Heroku role
