Skip to content

Commit

Permalink
Merge pull request #159 from nstrauss/master
Browse files Browse the repository at this point in the history
Add skip_scripts option
  • Loading branch information
grahampugh committed Aug 8, 2019
2 parents 2f2d65f + 0c7a12d commit 74755d8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion JSSImporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ class JSSImporter(Processor):
"and policy updates are coupled together. This allows group "
"updates without updating or overwriting policy scope."),
},
"skip_scripts": {
"required": False,
"default": False,
"description": "If True, policy scripts will not be updated.",
},
}
output_variables = {
"jss_changed_objects": {
Expand Down Expand Up @@ -936,7 +941,8 @@ def update_or_create_new(self, obj_cls, template_path, name="",
# If skip_scope is True then don't include scope data.
if self.env["skip_scope"] is not True:
self.add_scope_to_policy(recipe_object)
self.add_scripts_to_policy(recipe_object)
if self.env["skip_scripts"] is not True:
self.add_scripts_to_policy(recipe_object)
self.add_package_to_policy(recipe_object)

# If object is a script, add the passed contents to the object.
Expand Down

0 comments on commit 74755d8

Please sign in to comment.