Conditional Package

osbalde
New Contributor

I apologize if this question has been answered on another article but i haven't seen anything like it.

I want to know if it's possible to make a conditional software package in self service. Example:

I want to build a single Summer Update package that inexperienced interns can just walk around to the computers and run. The single Summer Update package will contain several other packages like updates for iWork, Keynote, Numbers, iPhoto, iMovie, and well as a few custom made packages.

My question is this, can a package be made that will include a check for iWork and then if the computer in question has iWork, only then will it run the update.

7 REPLIES 7

JPDyson
Valued Contributor

No, but yes.

The way we do this is:

  1. A policy that runs a command to call other policies (ie, jamf policy -trigger herecomesthebus)
  2. A Series of policies triggered by herecomesthebus, each one scoped to smart groups

Construct your smart groups such that the latter policies as you like (if iWork is present, and not the desired version, etc)

donmontalvo
Esteemed Contributor II

Sounds like a good opportunity to use softwareupdate command...

http://support.apple.com/kb/HT1974

--
https://donmontalvo.com

mm2270
Legendary Contributor III

Yeah, command line softwareupdate would work, but only for stuff like iWork and other Apple apps. Anything 3rd party you'd be SOL using that.
Best bet would be policies calling other policies as JPDyson outlined.

Though if you really wanted to build one huge package with all your updates included (not a great idea IMO) you could possibly do that using Packages.app (http://s.sudre.free.fr/Software/Packages/about.html) You can make a metapackage with it that would only run embedded installs if a preinstall script(s) passes some tests for example. It would take a bit of work to make it all happen, but its possible.
But then you'd have something that could quickly get out of date and need to keep rebuilding as new updates appear. That's why it might be best to keep it all as separate pieces being called individually.

acdesigntech
Contributor II

You could also try one of the scripts I mention in this link:https://jamfnation.jamfsoftware.com/discussion.html?id=5404

It does require that you set up smart groups for each software title you want to maintain, but runs a single master script to check the need for any or all updates (and any combination in between).

Chris_Hafner
Valued Contributor II

You could also set policies to cache the various packages you need on the specific units that need them using smart groups.

Then, create a policy by the name of "Install cached Packages"... or "Install Summer Packages" for your interns. In this way, you could simply set the "Install All Cached Packages" to simply install ALL cached packages. however, this could be dangerous if you've cached other packages that you may not necessarily want to light off. (I do this for adobe un-installers.)

If you have other cached packages, install the specific cached packages you want via one or more policies in self-service. It would also be far faster for the interns to verify.

With that said, I recommend

jarednichols
Honored Contributor

JP-
Nice custom trigger.

JPDyson
Valued Contributor

Ah, it seems I omitted a hat-tip to a certain former Casper admin...