Posted on 11-22-2013 06:23 AM
Surely I am doing something wrong, so I ask -
I have a smart group looking for a specific version of Chrome.
I want users to go to self service, run the policy that uninstalls that version, and then by a custom trigger, run the second policy to install the proper version based on my custom event trigger.
In a new policy, it is triggered by jamf policy -event chrome
In the policy that ought to run second, the Custom Event to use to initiate the policy is
chrome
The first policy runs from self service…removes the improper version of chrome, but the new version never shows up.
Logs for the uninstall policy tell me:
Running command jamf policy -event chrome...
Result of command: Checking for policies triggered by "chrome"... No policies were found for the "chrome" trigger.
So, is my syntax wrong on either of my policies or what?
Posted on 11-22-2013 06:28 AM
I would check to make sure the computers are meeting the scope requirements for the second policy. Typically when I have that type of problem it's either because the computers aren't in scope, or because they have already run the policy and the policy is set to "Once per computer".
Your syntax is correct, although you could move to calling the policy by ID # instead: jamf policy -id 123 You can get the ID # by going into the policy on the JSS and checking the URL for that policy. The ID # will be in the URL.
Posted on 11-22-2013 06:39 AM
thanks Steve.
I changed the trigger to be by ID.
I double checked my two smart groups and the two policy scopes.
The machine does move from smart groups as inventory runs, but alas, I still get a failure.
Tells me no policies were found for the trigger.
I also changed that second policy from "once per computer" to ongoing as I try to make it work.
Posted on 11-22-2013 06:43 AM
How do you have the second policy set for recurrence? Is it set to "Ongoing" or "Once Per Computer"? If you're set to "Once per", double check the policy log to make sure the computer hasn't already run the policy.
What happens if after the failure you try running the policy manually? Still get the same error even though the computer is in scope?
Posted on 11-22-2013 06:50 AM
it is set to Ongoing as I troubleshoot on this test machine.
I have not tried to run the second policy manually yet - I was hoping to stay clean and let the trigger run as designed..but I sure don't know why it won't work if my syntax is correct as well as my smart groups.
Posted on 11-22-2013 07:14 AM
As a test I would try running the policy manually just to see if it will install. If it is set to Ongoing, it will install again via the trigger.
Try running the policy manually and adding the -verbose option. That might help provide some insight into where the failure is.
jamf policy -id # -verbose
Posted on 11-22-2013 07:40 AM
You could also consider embedding a preinstall script inside a pkg install for the new version of Chrome that just rm -rfd's the path to the old Chrome version. We do something like that with our Firefox Self Service install. FF has a nasty habit of becoming broken if you install it on top of an older version so we simply rm the old app bundle, then drop the new one on disk in one installation.
Posted on 04-11-2014 03:30 AM
I am having the same issue, but this time with trying to do it with Skype.
The first policy runs fine, but it does not seem to run the trigger policy.
Finding it rather frustrating.
Posted on 06-09-2014 03:40 PM
This will happen if you didn't set a scope for the policy or the policy is set to once per computer/user and has already met that minimum. (Happened to me today.) Re-check your policy and make sure it's scoped to the machine you're trying to run it from.