ansible.builtin.homebrew (v2.3.0.0-1) — module

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 community

Install Ansible via pip

Install with pip install ansible==2.3.0.0.post1

Description

Manages Homebrew packages


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Install formula foo with 'brew' in default path (C(/usr/local/bin))
- homebrew:
    name: foo
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Install formula foo with 'brew' in alternate path C(/my/other/location/bin)
- homebrew:
    name: foo
    path: /my/other/location/bin
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Update homebrew first and install formula foo with 'brew' in default path
- homebrew:
    name: foo
    state: present
    update_homebrew: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Update homebrew first and upgrade formula foo to latest available with 'brew' in default path
- homebrew:
    name: foo
    state: latest
    update_homebrew: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Update homebrew and upgrade all packages
- homebrew:
    update_homebrew: yes
    upgrade_all: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Miscellaneous other examples
- homebrew:
    name: foo
    state: head
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew:
    name: foo
    state: linked
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew:
    name: foo
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew:
    name: foo,bar
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- homebrew:
    name: foo
    state: present
    install_options: with-baz,enable-debug

Inputs

    
name:
    aliases:
    - pkg
    - package
    - formula
    default: None
    description:
    - name of package to install/remove
    required: false

path:
    default: /usr/local/bin
    description:
    - ''':'' 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.'
    required: false

state:
    choices:
    - head
    - latest
    - present
    - absent
    - linked
    - unlinked
    default: present
    description:
    - state of the package
    required: false

upgrade_all:
    aliases:
    - upgrade
    choices:
    - 'yes'
    - 'no'
    default: false
    description:
    - upgrade all homebrew packages
    required: false

install_options:
    aliases:
    - options
    default: null
    description:
    - options flags to install a package
    required: false
    version_added: '1.4'
    version_added_collection: ansible.builtin

update_homebrew:
    aliases:
    - update-brew
    choices:
    - 'yes'
    - 'no'
    default: false
    description:
    - update homebrew itself first
    required: false