ansible / ansible.builtin / v2.7.17 / module / homebrew Package manager for Homebrew | "added in version" 1.1 of ansible.builtin" Authors: Indrajit Raychaudhuri (@indrajitr), Daniel Jaouen (@danieljaouen), Andrew Dunham (@andrew-d) preview | supported by communityansible.builtin.homebrew (v2.7.17) — module
pip
Install with pip install ansible==2.7.17
Manages Homebrew packages
# Install formula foo with 'brew' in default path (C(/usr/local/bin)) - homebrew: name: foo state: present
# Install formula foo with 'brew' in alternate path C(/my/other/location/bin) - homebrew: name: foo path: /my/other/location/bin state: present
# Update homebrew first and install formula foo with 'brew' in default path - homebrew: name: foo state: present update_homebrew: yes
# Update homebrew first and upgrade formula foo to latest available with 'brew' in default path - homebrew: name: foo state: latest update_homebrew: yes
# Update homebrew and upgrade all packages - homebrew: update_homebrew: yes upgrade_all: yes
# Miscellaneous other examples - homebrew: name: foo state: head
- homebrew: name: foo state: linked
- homebrew: name: foo state: absent
- homebrew: name: foo,bar state: absent
- homebrew: name: foo state: present install_options: with-baz,enable-debug
name: aliases: - pkg - package - formula description: - list of names of packages to install/remove path: default: /usr/local/bin description: - A ':' separated list of paths to search for 'brew' executable. Since a package (I(formula) in homebrew parlance) location is prefixed relative to the actual path of I(brew) command, providing an alternative I(brew) path enables managing different set of packages in an alternative location in the system. state: choices: - head - latest - present - absent - linked - unlinked default: present description: - state of the package upgrade_all: aliases: - upgrade default: 'no' description: - upgrade all homebrew packages type: bool install_options: aliases: - options description: - options flags to install a package version_added: '1.4' version_added_collection: ansible.builtin update_homebrew: aliases: - update-brew default: 'no' description: - update homebrew itself first type: bool