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
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
The pkg or dmg file to install
The location in which to install the package. This can be a path or LocalSystem
Is the given file a dmg file?
Should the pkg be installed as if it was from the Mac OS Store?
Is the file a .app? If so then we'll just copy that to /Applications/ or the given target
Is the file a .mpkg? If so then we'll check all of the .pkg files found are installed
Force the package to be installed even if its already been found installed
Allow the installation of untrusted packages
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]