arubdesu / jss-autopkg-addon Goto Github PK
View Code? Open in Web Editor NEWINACTIVE - Use https://github.com/sheagcraig/JSSImporter instead
INACTIVE - Use https://github.com/sheagcraig/JSSImporter instead
I don't see anything in JSSImporter.py in the template_string to set the category, so I'm guessing you just haven't gotten there yet or it wasn't working.
The category IS getting applied to the package.
Perhaps the package and policy aren't necessarily meant to share a category?
Thanks!
I am wondering if the smart group criteria can be changed on a per recipe basis.
For example, with Adobe Flash Player, the smart group creates the criteria "App Name: Adobe Flash Player.app" but inventory records don't list Flash as an Application, so the group stays at zero.
To track Flash versions, I use and extension attribute that reports back the version number. In a smart group, it appears as simply "Flash Version" is/is not "Version number". Can the recipe be modified to change that criteria on just this program?
Thanks!
followed these instructions https://github.com/autopkg/autopkg/wiki/Recipe-Overrides
my override looks like this
Identifier local.jss.Firefox Input CATEGORY %NAME% LOCALE en_GB NAME Firefox latest-esr latest-esr SELFSERVE_POLICY SelfServeLatest_%NAME% SMART_GROUP LessThanMostRecent_%NAME% ParentRecipe com.github.autopkg.jss.FirefoxWhen i look at the info it doesnt see it as the latest-esr release
Description: Uses parent pkg recipe to downloads latest Firefox and import it into the JSS.
Identifier: local.jss.Firefox
Munki import recipe: False
Has check phase: True
Builds package: True
Recipe file path: /Users/svccasperadmin/Library/AutoPkg/RecipeOverrides/Firefox.jss.recipe
Parent recipe(s): /Users/svccasperadmin/Library/AutoPkg/RecipeRepos/com.github.arubdesu.jssRecipes/Firefox.jss.recipe
/Users/svccasperadmin/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/Mozilla/Firefox.pkg.recipe
/Users/svccasperadmin/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/Mozilla/Firefox.download.recipe
Input values:
CATEGORY = "%NAME%";
LOCALE = "en_GB";
NAME = Firefox;
RELEASE = latest;
"SELFSERVE_POLICY" = "SelfServeLatest_%NAME%";
"SMART_GROUP" = "LessThanMostRecent_%NAME%";
"latest-esr" = "latest-esr";
While it's certainly easy to edit the policy template in JSSImporter.py directly for your needs, it does make merging changes potentially more difficult. Specifically, I prefer to not recon after every self-service install (which is where most of my autopkg pkgs are available). It makes a tiny package install end up taking several minutes.
Thought that might be a helpful enhancement.
Seems like whatever overrides i use, for say...the Firefox.jss recipe, are ignored by the jssimporter. I'd like to be able to modify the default name of the Category, Policy, and Smart Group.
When targeting Plugins such as Java, Flash, and Silverlight the importer wants to classify these items as Applications vs. Plugins. I think I have an idea what needs to be done and wanted to discuss to see if someone better at python could take this task.
Somewhere around line 60 we would need a new input_variables, something like
"plugin": {
"required": False,
"description": "If item is a plugin, mark this as true to identify as a Plugin Title/Version vs. a Application Title/version.",
},
Then around line 322 an if statement would be in place
if self.env.get("plugin"):
template_string = """<?xml version="1.0" encoding="UTF-8"?><computer_group><name>LessThanMostRecent_%PROD_NAME%</name><is_smart>true</is_smart><criteria><size>2</size><criterion><name>Plug-in Title</name><priority>0</priority><and_or>and</and_or><search_type>is</search_type><value>%PROD_NAME%</value></criterion><criterion><name>Plugin Version</name><priority>1</priority><and_or>and</and_or><search_type>is not</search_type><value>%version%</value></criterion></criteria><computers><size>0</size></computers></computer_group>"""
else:
template_string = """<?xml version="1.0" encoding="UTF-8"?><computer_group><name>LessThanMostRecent_%PROD_NAME%</name><is_smart>true</is_smart><criteria><size>2</size><criterion><name>Application Title</name><priority>0</priority><and_or>and</and_or><search_type>is</search_type><value>%PROD_NAME%.app</value></criterion><criterion><name>Application Version</name><priority>1</priority><and_or>and</and_or><search_type>is not</search_type><value>%version%</value></criterion></criteria><computers><size>0</size></computers></computer_group>"""
This way if you identify an item as a plugin in a recipe for plugin it should set the Smart group to search for Plug-ins vs. Applications.
When attempting to run any recipe, it will fail reporting:
Processing Adium.jss...
Failed.
The following recipes failed:
Adium.jss
JSSImporter requires missing argument API_PASSWORD
Nothing downloaded, packaged or imported.
However, I have in fact set the API_PASSWORD (as well as API_USERNAME, JSS_REPO and JSS_URL). Running defaults read
shows that the preference is indeed set.
While I only make flat packages at this point, when stuck with downloading them (for example, Silverlight is a non-flat package wrapped in a dmg), the JSSImporter.py fails as it uses shutil.copyfile to copy a single file rather than shutil.copytree to copy an entire directory.
I assume this is by design, of course, but I just discovered it in the course of updating all of my stuff today.
Perhaps there's a really easy way to convert a non-flat package to a flat package that I'm just not aware of. Thanks!
Hello,
Thanks for your work on this add on to AutoPKG to auto import into a JSS.
We want to use this on an active JSS but keep the packages to just a testing subset. No mater how much training you do, some of the techs will install anything they find in our JSS to try and fix something. Even if its not ready for production use.
With that in mind:
1-It looks like we can edit your jssRecipes to give it our standard "Category", "Smart _Group" and "SelfService_Policy" naming. Is there a way to put in an over ride to your jssRecipes, or should we just publish own?
2-Do you know if there is a way to pass generic place holder info for the "Info" and "Notes" package fields in the JSS,
We would like to have them say something like the following.
For "Info"
This is a test install of %NAME%. It should only be used for testing only.
For "Notes"
Added to JAMF Casper by AutoPKG and JSSImporter on "Date of import" and should only be used for testing.
Was at the MacAdmins Conference at PennState and saw your talk. You did a great session and it helped us see the value in using these automation tools for our environment.
Thanks Again,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.