Homebrew for macOS
Important
If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to 'pkg.install' is not available), see here.
This function is an alias of latest_version
.
Return the latest version of the named package available for upgrade or installation
Currently chooses stable versions, falling back to devel if that does not exist.
CLI Example:
salt '*' pkg.latest_version <package name> salt '*' pkg.latest_version <package1> <package2> <package3>
Return the information of the named package(s) installed on the system.
New in version 2016.3.1.
CLI example:
salt '*' pkg.info_installed <package1> salt '*' pkg.info_installed <package1> <package2> <package3> ...
Install the passed package(s) with brew install
The name of the formula to be installed. Note that this parameter is ignored if "pkgs" is passed.
CLI Example:
salt '*' pkg.install <package name>
Unofficial GitHub repos to use when updating and installing formulas.
CLI Example:
salt '*' pkg.install <package name> tap='<tap>'
salt '*' pkg.install zlib taps='homebrew/dupes'
salt '*' pkg.install php54 taps='["josegonzalez/php", "homebrew/dupes"]'
Options to pass to brew. Only applies to initial install. Due to how brew works, modifying chosen options requires a full uninstall followed by a fresh install. Note that if "pkgs" is used, all options will be passed to all packages. Unrecognized options for a package will be silently ignored by brew.
CLI Example:
salt '*' pkg.install <package name> tap='<tap>'
salt '*' pkg.install php54 taps='["josegonzalez/php", "homebrew/dupes"]' options='["--with-fpm"]'
Multiple Package Installation Options:
A list of formulas to install. Must be passed as a python list.
CLI Example:
salt '*' pkg.install pkgs='["foo","bar"]'
Returns a dict containing the new package names and versions:
{'<package>': {'old': '<old-version>', 'new': '<new-version>'}}
CLI Example:
salt '*' pkg.install 'package package package'
Return the latest version of the named package available for upgrade or installation
Currently chooses stable versions, falling back to devel if that does not exist.
CLI Example:
salt '*' pkg.latest_version <package name> salt '*' pkg.latest_version <package1> <package2> <package3>
List the packages currently installed in a dict:
{'<package_name>': '<version>'}
CLI Example:
salt '*' pkg.list_pkgs
Check whether or not an upgrade is available for all packages
CLI Example:
salt '*' pkg.list_upgrades
Update the homebrew package repository.
CLI Example:
salt '*' pkg.refresh_db
Removes packages with brew uninstall
.
Multiple Package Options:
name
parameter will be ignored if this option is passed.New in version 0.16.0.
Returns a dict containing the changes.
CLI Example:
salt '*' pkg.remove <package name> salt '*' pkg.remove <package1>,<package2>,<package3> salt '*' pkg.remove pkgs='["foo", "bar"]'
Upgrade outdated, unpinned brews.
Returns a dictionary containing the changes:
{'<package>': {'old': '<old-version>', 'new': '<new-version>'}}
CLI Example:
salt '*' pkg.upgrade
Check whether or not an upgrade is available for a given package
CLI Example:
salt '*' pkg.upgrade_available <package name>
Returns a string representing the package version or an empty string if not installed. If more than one package name is specified, a dict of name/version pairs is returned.
CLI Example:
salt '*' pkg.version <package name> salt '*' pkg.version <package1> <package2> <package3>
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mac_brew_pkg.html