jssimporter / jss_helper

jss_helper is deprecated.
GNU General Public License v3.0
66 stars 7 forks source link

"Promote" defaults package to "Install" even if policy is for "Cache" #14

Open rougegoat opened 8 years ago

rougegoat commented 8 years ago

Some of our policies are cache only. Whenever they are updated through jss_helper, the new package defaults to "Install" rather than whatever state the previous package was in.

It's not really a huge issue, but it would save a few steps on some policy updates.

sheagcraig commented 8 years ago

Yep-that is correct. Promote calls a Policy method named add_package, which you can see culminates in setting the action to "install" here

I think adding a defaulted argument to add_package, like def add_package(self, pkg, action="Install"): and then using that later in the method would solve the python-jss issue.

Then jss_helper could pull the previous policy's existing action and use that in the add_package call.

I can put these two changes onto the TODO list for the next release.

krispayne commented 6 years ago

This was a gotcha when deploying patchoo. Easy enough to work around but would love to be able to tell jss_helper to not change the install method