Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
AutoPkg for MunkiReport
If your munkireport server is running fine and you can create an install package from it, you can automate the process of creating installation packages using the munkireport autopkg recipe. This will help you create a new package suited for your organization when you update your munkireport server.
This guide assumes you have installed AutoPkg and you have some experience working with AutoPkg.
First add the munkireport recipe repository:
autopkg repo-add munkireport-recipes
This will give you two recipes, munkireport.pkg.recipe and munkireport.munki.recipe. The first will create a package, the second will add it to your munki repository. You cannot use the recipes at the moment, because you have to add some information about your munkireport installation. To add that, you'll need to make an override:
autopkg make-override munkireport.munki
AutoPkg has created an override file for you: ~/Library/AutoPkg/RecipeOverrides/munkireport.munki.recipe. Now you can edit the file with your favorite editor.
The most important setting you have to change is
This has to be the url that you use to access your munkireport server minus /index.php?etc.
You could also change MUNKI_REPO_SUBDIR, NAME and modules. If you add modules here, you will force the modules that get packaged into the munkireport package, the modules you set in config.php will be ignored. Add modules in the following way:
<key>modules</key> <array> <string>localadmin</string> <string>bluetooth</string> </array>
You can test your new recipe by running
autopkg run -v munkireport.munki.recipe
If all goes well, you'll have imported a new Munkireport package into your munki repository.
You can override the version (if you want to push a new package to your clients with a different configuration) by setting the version explicit in the autopkg run:
autopkg run -v --key version=184.108.40.206 munkireport.munki.recipe