How to specify what applications a MAC will receive according to the Mac's naming convention

NaomiT
New Contributor

Hi,

I am trying to set up something similar to our SCCM task sequence variables so that certain software programs are installed during netboot imaging only if a Mac has a specific naming convention. Here are a few examples:

If the Mac has this in the naming convention: TTD, TTL (Teacher CTE Desktop/Laptop) then it will install the ProTools software package in addition to the base level software programs for a teacher (Chrome, MS Office 2016, Lync, etc.)

If the Mac has this in the naming convention: TID, TIL (Teacher Instructional Desktop/Laptop) then it will install just the base level software programs for a teacher (Chrome, MS Office 2016, Lync, etc.)

All regular student named Macs should receive the same base level programs as teachers except Lync and Outlook.

My goal is to just use one configuration profile and then if possible use a script to determine by the naming convention which software would be installed during imaging. I do not have much experience with scripting. I have not been able to find anything on JAMF Nation. Is this something that can be scripted? Any suggestions?

10 REPLIES 10

alexjdale
Valued Contributor III

Why do you only want to use one imaging configuration? Managing a couple configurations would be way easier than a more complicated scripted method, and whoever is doing the imaging has better visibility into what is being done.

You certainly could script it and have a script determine what needs to be installed, calling trigger policies to install applications as needed (with common apps being installed for all systems as part of the configuration).

boberito
Valued Contributor

Wouldn't this be what smart groups and policies are for?

Smart Group based off the name. Policy scoped to smart group.

millersc
Valued Contributor

We are using Smart Groups and a custom naming convention like you.

431db6aa5d39473c98cb7dfbac22b1d2
bbd4bea9edb5410b9d497ad281eb5ca8

We also use Smart Groups that assign specific computer names. If a computer get re-imaged or exchanged, but uses the same name, these allow for the exact software to be installed by jamfPRO.

b60a16e3c1ac457ebf735909bddae7d0

Imaging from start to finish on average is 30-40 mins, give or take.

alexjdale
Valued Contributor III

I hesitated to mention Smart Group policies because in most environments, re-enrolling the client will cause it to reinstall all of the applications.

sdagley
Honored Contributor II

@alexjdale You can avoid reinstallation on re-enrollment by creating a Smart Group for machines with the software installed, and excluding that group from the Scope of your Policy that does the installation.

@millersc One of the things stressed at the Jamf trainings is that you don't want to over craft your Smart Groups as you incur overhead for each one. So for your Office 2016 Policy I'd use the 3 computer groups as the Scope Targets, and have a Smart Group with OS < 10.10 as an Exclusion.

millersc
Valued Contributor

@sdagley I've spoken with many TAMs about the overhead and it's impact. I believe it really falls on each environment and admin. I wouldn't have to even use Smart Groups if jamf would go back to using AD Groups like it used to in 8.x. This would off load a lot of the heavy lifting, while only need a few Smart Groups on the jamfPro server.

NaomiT
New Contributor

Thanks everyone!

@alexjdale Our environment is nearly all Windows PCs. All of our currently supported Windows PCs are supported with one default task sequence. I was trying to make this configuration just as streamlined and familiar for our engineers as well. There would also be less chance of an error (the engineer may accidentally select the wrong configuration). I originally started out setting up two configurations but then decided to try to see if I can merge it into one. I may end up going back to two or possibly more configurations.

@boberito We have Smart Groups and policies set up to push out some programs but I was thinking those would be mostly fo prestage enrolled Macs. I will take a look at this again.

@millersc Thanks! I need to look at refining my smart groups to really drill down on the Macs I need for software installation.

sdagley
Honored Contributor II

@millersc To use a politically correct axiom, there's many ways to cook an egg. One of the ways I stress my JSS is to run an Update Inventory policy at least once a day, so reducing the number of Smart Groups is my effort to be kind to it.

Look
Valued Contributor III

You can create the deployment policies scoped to everyone but using custom triggers.
Then you just call them one after another as needed from a script with.
jamf policy -event "REQUIRED_CUSTOM_TRIGGER"
Then you can build any sort of logic you like into the script, you could even have the script run as "at reboot" in the configuration, then it would only happen once in the post reboot part of Casper Imaging and not when you re-enrolled or anything.

Look
Valued Contributor III

Or do the same thing but with the script as a self destructing launch agent if it needs to occur on the first "real" boot.