salt.modules.mac_package module

Install pkg, dmg and .app applications on Mac OS X minions.

salt.modules.mac_package.get_mpkg_ids(mpkg)

Attempt to get the package ids from a mounted .mpkg file

Returns all of the package ids if the pkg file contains multiple

pkg
The location of the mounted mpkg file
salt.modules.mac_package.get_pkg_id(pkg)

Attempt to get the package id from a .pkg file

Returns all of the package ids if the pkg file contains multiple

pkg
The location of the pkg file
salt.modules.mac_package.install(pkg, target='LocalSystem', store=False, allow_untrusted=False)

Install a pkg file

CLI Example:

salt '*' macpackage.install test.pkg
target
The target in which to install the package to
store
Should the package be installed as if it was from the store?
allow_untrusted
Allow the installation of untrusted packages?
salt.modules.mac_package.install_app(app, target='/Applications/')

Install an app file

CLI Example:

salt '*' macpackage.install_app /tmp/tmp.app /Applications/
app
The location of the .app file
target
The target in which to install the package to
salt.modules.mac_package.installed_pkgs()

Return the list of installed packages on the machine

salt.modules.mac_package.mount(dmg)

Attempt to mount a dmg file to a temporary location and return the location of the pkg file inside

dmg
The location of the dmg file to mount
salt.modules.mac_package.uninstall_app(app)

Uninstall an app file

CLI Example:

salt '*' macpackage.uninstall_app /Applications/app.app
app
The location of the .app file
salt.modules.mac_package.unmount(mountpoint)

Attempt to unmount a dmg file from a temporary location

mountpoint
The location of the mount point