Comments (11)
It's an interesting idea. I'd like to see someone build a POC using admin-provided conditions (maybe using munki-facts) to test out the concept and get a feel for performance, overhead, etc.
from munki.
I've been using a munki-fact based on the inbuilt app_data function to retrieve the installed bundle IDs to use in conditional_items and installable_conditions. It does take a few seconds longer at the beginning of a managedsoftwareupate run, but I'm currently willing to live with that for the extra functionality.
I imagine the overhead would be less if this were a built-in conditional item and the data was written into ConditionalItems.plist at the point the app_data / saveappdata functions are called during a managedsoftwareupdate run.
from munki.
Decided to play with this today. It would be pretty easy to extend the "built-in" facts with a single "applications" array of dictionaries that contains the same info currently written to ApplicationInventory.plist. This would allow for predicates like
ANY applications.name == "Microsoft Word"
which would return True if Microsoft Word was installed, or
ANY applications.bundleid BEGINSWITH "com.adobe"
which would return True if any Adobe apps were installed.
You could even do
ANY applications.path == "/Applications/Firefox.app"
if you only wanted to test for apps installed in /Applications, and not return True for apps that might be in a user's home dir or in /Users/Shared.
I don't see any easy way to test for a specific version of an app, or specify a predicate that matches an app if it's lower than a specific version.
from munki.
After reading up on the underdocumented SUBQUERY keyword for NSPredicate, I have a predicate that returns True if Microsoft Word, version "16.82" is installed:
SUBQUERY(applications, $a, $a.bundleid == "com.microsoft.Word" AND $a.version == "16.82").@count > 0
from munki.
One could also do something like:
SUBQUERY(applications, $a, $a.bundleid == "com.microsoft.Word" AND $a.version BEGINSWITH "16.").@count > 0
to determine if Microsoft Word with a "major version" of "16" was installed.
from munki.
See https://funwithobjc.tumblr.com/post/2726166818/what-the-heck-is-subquery
from munki.
See also https://github.com/munki/munki/wiki/_Preview-of-Conditional-Application-Data
from munki.
from munki.
There's really nothing here that couldn't have been done with a custom "fact" script, but having it built in is a little more efficient and makes if far more likely Munki admins will actually use it.
from munki.
from munki.
Munki 6.5 has been released and contains an implementation of the requested feature here.
from munki.
Related Issues (20)
- Logic error when processing requires items that fail to download HOT 2
- Minor MSC UI issue - Removing app progress HOT 4
- Option to check for items to install only, 'dry run' HOT 1
- MSC 6.2.1.4599 crashes on macOS 10.13 HOT 18
- munkiimport and munkilib/pkgutils.py crash with packages containing .dist file HOT 13
- Preinstall_alerts not being shown for updated software HOT 3
- Placment of the back button in Managed Software Centre HOT 9
- [Feature Request] - Add a Pkginfo Key to skip update check HOT 2
- security issue: Writing sensitive information into log file HOT 3
- Option to ignore unmanaged preferences HOT 4
- Question: Does munki have a client CLI tool for software installation and update HOT 1
- installable_condition crashes client HOT 10
- Application failing to install HOT 1
- Update Python to Version 3.12 HOT 19
- Improve logging for "could not find unique packages to remove for item_name" warnings HOT 7
- TLS Certificat für https://munkibuilds.org/ is not correct HOT 5
- When importing bundle packages in macOS 14.4 RestartAction is set incorrectly HOT 3
- GarageBand Loops Wiki needs updating HOT 5
- BUG: Application info removed from info object during updatecheck and breaks conditions that require said info HOT 2
- catalogs data not being collected in ManagedInstallsInfo after 6.5.1.4661 update HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from munki.