Install pkg, dmg and .app applications on macOS minions.
Attempt to get the package IDs from a mounted .mpkg file
mpkg (str) -- The location of the mounted mpkg file
List of package IDs
list
CLI Example:
salt '*' macpackage.get_mpkg_ids /dev/disk2
Attempt to get the package ID from a .pkg file
pkg (str) -- The location of the pkg file
List of all of the package IDs
list
CLI Example:
salt '*' macpackage.get_pkg_id /tmp/test.pkg
Install a pkg file
pkg (str) -- The package to install
target (str) -- The target in which to install the package to
store (bool) -- Should the package be installed as if it was from the store?
allow_untrusted (bool) -- Allow the installation of untrusted packages?
A dictionary containing the results of the installation
dict
CLI Example:
salt '*' macpackage.install test.pkg
Install an app file by moving it into the specified Applications directory
app (str) -- The location of the .app file
target (str) -- The target in which to install the package to Default is ''/Applications/''
The results of the rsync command
str
CLI Example:
salt '*' macpackage.install_app /tmp/tmp.app /Applications/
Return the list of installed packages on the machine
List of installed packages
list
CLI Example:
salt '*' macpackage.installed_pkgs
Attempt to mount a dmg file to a temporary location and return the location of the pkg file inside
dmg (str) -- The location of the dmg file to mount
point
tuple
CLI Example:
salt '*' macpackage.mount /tmp/software.dmg
Uninstall an app file by removing it from the Applications directory
app (str) -- The location of the .app file
True if successful, otherwise False
bool
CLI Example:
salt '*' macpackage.uninstall_app /Applications/app.app
Attempt to unmount a dmg file from a temporary location
mountpoint (str) -- The location of the mount point
The results of the hdutil detach command
str
CLI Example:
salt '*' macpackage.unmount /dev/disk2