autopkg / sheagcraig-recipes

10 stars 30 forks source link

SmartGroupTemplate #6

Closed JonMunford closed 8 years ago

JonMunford commented 9 years ago

Hey Shea, I wanted to thank you for all of the JSS work you do. I use a lot of it in production and it saves me countless hours every day.

I want to modify the SmartGroupTemplate but am unsure of how to add the quotations to group and/or statements using the xml file. Could you shed some light on that for me?

Thanks!

sheagcraig commented 9 years ago

Sure, no problem. Can you give me a little more of an idea about what you're trying to do?

The easiest way to see what a "valid" XML file for the smart group you would like to template is to make one in the JSS web interface, and then use the API page to look at it. (i.e. https://myjss.org:8443/API , then go to Computer Groups, and put in your username/password in the group lookup.

You can then use the text substitution where needed. You can now use any AutoPkg environment variable in text substitution, so %NAME%, version, etc could all be used.

As for the actual arguments to JSSImporter, you just need to add a group to the array of groups with the template listed. You don't need to make it overridable with the INPUT section (although you can).

Let me know what you're planning and give the above a go and we'll get it going!

JonMunford commented 9 years ago

What i'm wanting to do is change the SmartGroup that is created so it says something the attached image. It is how I scope things to particular versions of OSX.

I can add all of the criteria via a modified SmartGroupTemplate.xml but I need to figure out how to put quotation marks around the phrases of and/or statements.

Thanks!

On Mon, Apr 27, 2015 at 2:19 PM, Shea Craig notifications@github.com wrote:

Sure, no problem. Can you give me a little more of an idea about what you're trying to do?

The easiest way to see what a "valid" XML file for the smart group you would like to template is to make one in the JSS web interface, and then use the API page to look at it. (i.e. https://myjss.org:8443/API , then go to Computer Groups, and put in your username/password in the group lookup.

You can then use the text substitution where needed. You can now use any AutoPkg environment variable in text substitution, so %NAME%, version, etc could all be used.

As for the actual arguments to JSSImporter, you just need to add a group to the array of groups with the template listed. You don't need to make it overridable with the INPUT section (although you can).

Let me know what you're planning and give the above a go and we'll get it going!

— Reply to this email directly or view it on GitHub https://github.com/autopkg/sheagcraig-recipes/issues/6#issuecomment-96785782 .

sheagcraig commented 8 years ago

@JonMunford Wow-This issue definitely got lost in the shuffle. Did you figure this out, or do you still need some help?

sheagcraig commented 8 years ago

Closing due to no-response.