Building a Casper smart group containing Sierra-incompatible Macs
As part of preparing for macOS Sierra, I’m planning to provide a way for my customers to upgrade themselves to Sierra via Casper’s Self Service. Unlike the upgrade process I was able to provide for OS X Yosemite and El Capitan, where I could filter based on whether or not a particular Mac could run OS X 10.8.x, Sierra’s system requirements exclude some Macs which can support running OS X El Capitan.
To help make sure that Self Service wasn’t providing the option of upgrading to macOS Sierra to a Mac which couldn’t run it, I needed to compile lists of which Mac models could and couldn’t run macOS Sierra, based on the system requirements that Apple provided. For more details, see below the jump:
As of Tuesday, September 20 2016, here is the list of Mac models not compatible with macOS Sierra:
As of Tuesday, September 20 2016, here is the list of Mac models compatible with macOS Sierra (with both model ID and board ID):
Once both lists were compiled, I had to decide whether or not to filter based on if a Mac was compatible or incompatible with Sierra. Since the list of incompatible Macs was not likely to change, I decided to go the route of excluding incompatible Macs. As part of that, I needed to build a Casper smart group containing the model IDs of those incompatible Macs.
Since that was otherwise going to involve a lot of clicking in the web interface, I opted to build a smart group XML file and then import the complete smart group via the Casper API. The smart group XML file is available below:
To upload it to a JSS server using the API, download the XML file to a convenient location, then run the command shown below (substituting as appropriate):
curl -skfu username:password https://casper.server.here:8443/JSSResource/computergroups/id/0 -T /path/to/filename.xml -X POST;
If the smart group was successfully uploaded, you should next see output similar to that shown below:
A new smart group named Macs incompatible with macOS Sierra should also now be present on the JSS.