Skip to content
Jon Crain edited this page Dec 3, 2018 · 1 revision

AutoPkg

If your MunkiReport server is running 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

<key>BASEURL</key>
<string>http://localhost:8888</string>

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 .env 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.

Version override

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=3.1.1.1 munkireport.munki.recipe
Clone this wiki locally