Note
This plugin is part of the community.general collection (version 2.0.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.homebrew_cask
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
accept_external_apps boolean |
| Allow external apps. |
greedy boolean |
| Upgrade casks that auto update. Passes --greedy to brew cask outdated when checking if an installed cask has a newer version available. |
install_options list / elements=string | Options flags to install a package. aliases: options | |
name list / elements=string | Name of cask to install or remove. aliases: cask, package, pkg | |
path path | Default: "/usr/local/bin:/opt/homebrew/bin" | ':' separated list of paths to search for 'brew' executable. |
state string |
| State of the cask. |
sudo_password string | The sudo password to be passed to SUDO_ASKPASS. | |
update_homebrew boolean |
| Update homebrew itself first. Note that brew cask update is a synonym for brew update .aliases: update-brew |
upgrade_all boolean |
| Upgrade all casks. Mutually exclusive with upgraded state.aliases: upgrade |
- 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: 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 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 }}"
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/homebrew_cask_module.html