# salt.states.macpackage

## Installing of mac pkg files

Install any kind of pkg, dmg or app file on macOS:

    /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\n.*7B91b

salt.states.macpackage.installed(name, target='LocalSystem', dmg=False, store=False, app=False, mpkg=False, 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

  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.

        version_check: python --version_check=2.7.[0-9]