salt.states.mac_package module

Installing of mac pkg files

Install any kind of pkg, dmg or app file on Mac OS X:

/mnt/test.pkg:
  macpackage.installed:
    - store: True

/mnt/test.dmg:
  macpackage.installed:
    - dmg: True

/mnt/xcode.dmg:
    macpackage.installed:
        - dmg: True
        - app: True
        - target: /Applications/Xcode.app
        - version_check: xcodebuild -version=Xcode 7.1

.*7B91b

salt.states.mac_package.installed(name, target='LocalSystem', dmg=False, store=False, app=False, mpkg=False, user=None, onlyif=None, unless=None, force=False, allow_untrusted=False, version_check=None)

Install a Mac OS Package from a pkg or dmg file, if given a dmg file it will first be mounted in a temporary location

name
The pkg or dmg file to install
target
The location in which to install the package. This can be a path or LocalSystem
dmg
Is the given file a dmg file?
store
Should the pkg be installed as if it was from the Mac OS Store?
app
Is the file a .app? If so then we'll just copy that to /Applications/ or the given target
mpkg
Is the file a .mpkg? If so then we'll check all of the .pkg files found are installed
user
Name of the user performing the unless or onlyif checks
onlyif
A command to run as a check, run the named command only if the command passed to the onlyif option returns true
unless
A command to run as a check, only run the named command if the command passed to the unless option returns false
force
Force the package to be installed even if its already been found installed
allow_untrusted
Allow the installation of untrusted packages
version_check
The command and version that we want to check against, the version number can use regex.