Munki: find out in which manifests a package is available

I sometimes need to know which manifests would be affected by an update to a Munki package, or need to know which manifests another manifest is included within. There are no tools to do this, so I wrote a script to do it. I suspect that someone could write it much more efficiently – it takes some time to iterate through all the manifests.

Make the script executable:

$ chmod +x /path/to/manifest-find.sh

To run the script:

$ /path/to/manifest-find.sh -f package-name

Example output, showing all manifests in which Xcode is made available (either as managed_install or optional_install):

./manifest-find.sh -f Xcode

==== MANIFESTS CONTAINING "Xcode" ====
Included: Xcode
_sw_testing_group
client-it021669
_cg_testing_group
client-it000492
client-it000912
client-it011313
client-it005896
client-IT029452
client-it015180
client-IT006319
client-it006319
client-it031540
client-it000545
client-it013465
client-it015172
client-it000516
client-it031455
client-it013544

Results outputted to manifests.txt
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s