-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module for admin-provided munki conditions #850
Conversation
The munkireport module grabs the Munki installation dir this way:
You'll need to import CoreFoundation for this. I would set it to the default path like you are now, and only update if the ManagedInstallDir pref is set. |
get path from prefs, shift code around
Thanks, I made some adjustments to the script to use the munki prefs, with a fallback to a default path if the pref doesn't work. |
@tuxudo suggests that it would be best to have values stored as BLOB instead of VARCHAR. I will work on that next. |
Sorry for the late reaction. This looks great. Just one nitpick: could you rename the module to munki_facts? Although they are used as conditions, I think they should be treated as facts. |
resolve #627 from @flammable.
resolve #835 from @flammable.
Please let me know if you have any suggestions.
For one, I didn't know how to get the location of ManagedInstallReport.plist from prefs so it is hardcoded in the client script.
Second, all values are truncated and stored as 255 character strings. Would it be preferred to utilize BLOB so that JSON could be used to store arrays?
Munki Conditions Module
Provides the results of munki conditions, allowing admins to easily generate their own reportable datapoints without creating custom MunkiReport modules. Condition scripts are even easier to create using munki-facts.
Admin-Provided Condition scripts are found in
/usr/local/munki/conditions
.The results of these scripts are stored in the 'Conditions' dictionary in
/Library/Managed Installs/ManagedInstallReport.plist
.Both keys and values are truncated to 255 characters.
The following information is stored in the munki_conditions table:
This module is mostly based on work by clburlison, erikng, bochoven and more.