homebrew_cask – Install/uninstall homebrew casks

Synopsis

  • Manages Homebrew casks.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 2.6

Parameters

Parameter Choices/Defaults Comments
accept_external_apps
boolean
added in 2.5.0
    Choices:
  • no ←
  • yes
allow external apps
greedy
boolean
added in 2.7.0
    Choices:
  • no ←
  • yes
upgrade casks that auto update; passes --greedy to brew cask outdated when checking if an installed cask has a newer version available
install_options
-
added in 2.2
options flags to install a package

aliases: options
name
- / required
name of cask to install/remove

aliases: pkg, package, cask
path
-
Default:
"/usr/local/bin"
':' separated list of paths to search for 'brew' executable.
state
-
    Choices:
  • present ←
  • absent
  • upgraded
state of the cask
sudo_password
-
added in 2.8
The sudo password to be passed to SUDO_ASKPASS.
update_homebrew
boolean
added in 2.2
    Choices:
  • no ←
  • yes
update homebrew itself first. Note that brew cask update is a synonym for brew update.

aliases: update-brew
upgrade
boolean
added in 2.5.0
    Choices:
  • no ←
  • yes
upgrade all casks (mutually exclusive with `upgrade_all`)
upgrade_all
boolean
added in 2.5.0
    Choices:
  • no ←
  • yes
upgrade all casks (mutually exclusive with `upgrade`)

Examples

- homebrew_cask:
    name: alfred
    state: present

- homebrew_cask:
    name: alfred
    state: absent

- homebrew_cask:
    name: alfred
    state: present
    install_options: 'appdir=/Applications'

- homebrew_cask:
    name: alfred
    state: present
    install_options: 'debug,appdir=/Applications'

- homebrew_cask:
    name: alfred
    state: present
    allow_external_apps: True

- homebrew_cask:
    name: alfred
    state: absent
    install_options: force

- homebrew_cask:
    upgrade_all: true

- homebrew_cask:
    name: alfred
    state: upgraded
    install_options: force

- homebrew_cask:
    name: 1password
    state: upgraded
    greedy: True

- homebrew_cask:
    name: wireshark
    state: present
    sudo_password: "{{ ansible_become_pass }}"

Status

Authors

  • Indrajit Raychaudhuri (@indrajitr)

  • Daniel Jaouen (@danieljaouen)

  • Enric Lluelles (@enriclluelles)

Hint

If you notice any issues in this documentation you can edit this document to improve it.