ansible.builtin.homebrew_cask (v2.7.18) — module

Install/uninstall homebrew casks.

| "added in version" 1.6 of ansible.builtin"

Authors: Indrajit Raychaudhuri (@indrajitr), Daniel Jaouen (@danieljaouen), Enric Lluelles (@enriclluelles)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.7.18

Description

Manages Homebrew casks.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: alfred
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: alfred
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: alfred
    state: present
    install_options: 'appdir=/Applications'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: alfred
    state: present
    install_options: 'debug,appdir=/Applications'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: alfred
    state: present
    allow_external_apps: True
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: alfred
    state: absent
    install_options: force
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    upgrade_all: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: alfred
    state: upgraded
    install_options: force
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew_cask:
    name: 1password
    state: upgraded
    greedy: True

Inputs

    
name:
    aliases:
    - pkg
    - package
    - cask
    description:
    - name of cask to install/remove
    required: true

path:
    default: /usr/local/bin
    description:
    - ''':'' separated list of paths to search for ''brew'' executable.'

state:
    choices:
    - present
    - absent
    - upgraded
    default: present
    description:
    - state of the cask

greedy:
    default: 'no'
    description:
    - upgrade casks that auto update; passes --greedy to brew cask outdated when checking
      if an installed cask has a newer version available
    type: bool
    version_added: 2.7.0
    version_added_collection: ansible.builtin

upgrade:
    default: 'no'
    description:
    - upgrade all casks (mutually exclusive with `upgrade_all`)
    type: bool
    version_added: 2.5.0
    version_added_collection: ansible.builtin

upgrade_all:
    default: 'no'
    description:
    - upgrade all casks (mutually exclusive with `upgrade`)
    type: bool
    version_added: 2.5.0
    version_added_collection: ansible.builtin

install_options:
    aliases:
    - options
    description:
    - options flags to install a package
    version_added: '2.2'
    version_added_collection: ansible.builtin

update_homebrew:
    aliases:
    - update-brew
    default: 'no'
    description:
    - update homebrew itself first. Note that C(brew cask update) is a synonym for C(brew
      update).
    type: bool
    version_added: '2.2'
    version_added_collection: ansible.builtin

accept_external_apps:
    default: 'no'
    description:
    - allow external apps
    type: bool
    version_added: 2.5.0
    version_added_collection: ansible.builtin