Skip to content

brew Facts

See also: operations/brew.

brew.BrewCasks

host.get_fact(BrewCasks)

Returns a dict of installed brew casks:

{
    "package_name": ["version"],
}

brew.BrewPackages

host.get_fact(BrewPackages)

Returns a dict of installed brew packages:

{
    "package_name": ["version"],
}

Note

Homebrew maintains separate versions of certain formulae (e.g. python, postgres and node) and multiple versions of these formulae can be installed at the same time (e.g. python@3.15 and python@3.10) but Homebrew does not otherwise support installing a specific version of a formula (e.g. rclone@1.75). In the case where multiple versions of a formula are installed at once, they will show up as distinct entries in BrewPackages

brew.BrewTaps

host.get_fact(BrewTaps)

Returns a list of brew taps.

{
    "@local": [
        "homebrew/cask",
        "homebrew/core",
        "homebrew/services",
    ]
}

brew.BrewTrusted

host.get_fact(BrewTrusted)

Returns a dict with lists of the casks, commands, formulae and taps that have been marked as trusted

{
    "@local": {
        "taps": [
            "borgbackup/tap"
        ],
        "formulae": [],
        "casks": [],
        "commands": []
    }
}

brew.BrewVersion

host.get_fact(BrewVersion)

Returns the version of brew installed as a semantic versioning list:

[major, minor, patch]