Autopkg/JSSImporter : Disable the creation of Smart Group

248 views
Skip to first unread message

microservo

unread,
Oct 4, 2016, 5:29:56 AM10/4/16
to autopkg-discuss
Hi To All,
 I'm using Autopkg with JSSimporter to upload the package and policy to JSS.
 For the moment I don't need the creatio of SmartGroup, because I'm using another logic.
 Is there a way to avoid/disable the creation of the Smart Group ? For the moment the only workaround is create a fake/empty Group not used from the package.

 Thanks in advance for the help
 M.

Elliot Jordan

unread,
Oct 4, 2016, 12:35:59 PM10/4/16
to autopkg...@googlegroups.com
Hello,

I think you'll need to make these three changes:

First, you'll want to edit your recipe override to contain an empty GROUP_TEMPLATE string:

<key>GROUP_TEMPLATE</key>
<string></string>

Next, you'll want to edit your recipe override to contain a custom POLICY_TEMPLATE file:

<key>POLICY_TEMPLATE</key>
<string>PolicyTemplate-NoSmartGroup.xml</string>

Finally, duplicate the stock PolicyTemplate.xml file into a new file called PolicyTemplate-NoSmartGroup.xml, move it to your RecipeOverrides folder, and edit the scope from this:

<scope>
    <!--Scope added by JSSImporter-->
</scope>

to this:

<scope/>


The effect of the above will be to create a policy with no scope at all. Of course you can choose to define a hard-coded scope if you prefer, as I do with my Self Service policies:

<scope>
    <all_computers>true</all_computers>
</scope>


It's all possible with the magic of XML. :-)

Elliot



--
You received this message because you are subscribed to the Google Groups "autopkg-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autopkg-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

microservo

unread,
Oct 6, 2016, 10:30:54 AM10/6/16
to autopkg-discuss
Great Thanks!
The answer for me was the syntax to pass an empty "Group Template" in the override policy so


<key>GROUP_TEMPLATE</key>
<string></string>

(Before your hint I've tried to remove completely this part, but of course without this it will point to the original recipe..)

I already had a scope configured in the Policy so with this changes now everything works as expected (so Policy uploade with my scope and not Group Created)

Thanks again.





On Tuesday, 4 October 2016 18:35:59 UTC+2, Elliot Jordan wrote:
Hello,

I think you'll need to make these three changes:

First, you'll want to edit your recipe override to contain an empty GROUP_TEMPLATE string:

<key>GROUP_TEMPLATE</key>
<string></string>

[cut]

Reply all
Reply to author
Forward
0 new messages