Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

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

Open
rougegoat opened this issue Feb 10, 2016 · 2 comments
Open

Comments

@rougegoat
Copy link

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
Copy link
Collaborator

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants