community / community.general / 6.6.8 / module / homebrew_cask Install and uninstall homebrew casks Authors: Indrajit Raychaudhuri (@indrajitr), Daniel Jaouen (@danieljaouen), Enric Lluelles (@enriclluelles)community.general.homebrew_cask (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
Manages Homebrew casks.
- name: Install cask community.general.homebrew_cask: name: alfred state: present
- name: Remove cask community.general.homebrew_cask: name: alfred state: absent
- name: Install cask with install options community.general.homebrew_cask: name: alfred state: present install_options: 'appdir=/Applications'
- name: Install cask with install options community.general.homebrew_cask: name: alfred state: present install_options: 'debug,appdir=/Applications'
- name: Install cask with force option community.general.homebrew_cask: name: alfred state: present install_options: force
- name: Allow external app community.general.homebrew_cask: name: alfred state: present accept_external_apps: true
- name: Remove cask with force option community.general.homebrew_cask: name: alfred state: absent install_options: force
- name: Upgrade all casks community.general.homebrew_cask: upgrade_all: true
- name: Upgrade all casks with greedy option community.general.homebrew_cask: upgrade_all: true greedy: true
- name: Upgrade given cask with force option community.general.homebrew_cask: name: alfred state: upgraded install_options: force
- name: Upgrade cask with greedy option community.general.homebrew_cask: name: 1password state: upgraded greedy: true
- name: Using sudo password for installing cask community.general.homebrew_cask: name: wireshark state: present sudo_password: "{{ ansible_become_pass }}"
name: aliases: - cask - package - pkg description: - Name of cask to install or remove. elements: str type: list path: default: /usr/local/bin:/opt/homebrew/bin description: - ''':'' separated list of paths to search for ''brew'' executable.' type: path state: choices: - absent - installed - latest - present - removed - uninstalled - upgraded default: present description: - State of the cask. type: str greedy: default: false description: - Upgrade casks that auto update. - Passes C(--greedy) to C(brew outdated --cask) when checking if an installed cask has a newer version available, or to C(brew upgrade --cask) when upgrading all casks. type: bool upgrade_all: aliases: - upgrade default: false description: - Upgrade all casks. - Mutually exclusive with C(upgraded) state. type: bool sudo_password: description: - The sudo password to be passed to SUDO_ASKPASS. required: false type: str install_options: aliases: - options description: - Options flags to install a package. elements: str type: list update_homebrew: default: false description: - Update homebrew itself first. - Note that C(brew cask update) is a synonym for C(brew update). type: bool accept_external_apps: default: false description: - Allow external apps. type: bool