Running trigger policies from a Casper-executed script?

alexjdale
Valued Contributor III

I'm currently running 8.64 and find that when I run a trigger policy via the binary (jamf policy -trigger) in a script that is itself running from a policy, the jamf binary tries to re-mount the distribution point and ultimately fails to run that trigger policy.

Does anyone know of a way around this or if this is fixed in 9.x?

7 REPLIES 7

ernstcs
Contributor III

@alexjdale, what is it that you're trying to do that you're calling a policy within a policy? If this is an Ongoing policy I'm wondering if you make the first policy calling the second as "Make Available Offline" it might help or both? If it isn't an Ongoing really just need to understand better what it is you're trying to accomplish.

donmontalvo
Esteemed Contributor III

Wasn't that fixed in 8.7?

--
https://donmontalvo.com

ernstcs
Contributor III

Don, it may have been, but whenever I see things like this being done it still begs the question why.

alexjdale
Valued Contributor III

To answer the question, I would like a policy that executes a script with various logic that will trigger other policies to run in certain situations (like install software that is not detected, but not install it if it is already present). This will be an "on enrollment" policy that I want to use to enforce a certain baseline configuration so I don't want it applying to all systems, just new ones.

Glad to hear that was fixed in 8.7, I will test that in my 9.2 lab.

ernstcs
Contributor III

So how are you starting the "on enrollment" process in the first place? What starts off this whole thing? What triggers that first policy?

mm2270
Legendary Contributor III

"On enrollment" is a new trigger, or event, as they're called now, in version 9.x of the Casper Suite. Sounds like he's trying to create a no imaging setup, where right upon being enrolled in Casper, the Mac gets any necessary packages and configurations pushed to it, assuming its a new Mac and not something being re-enrolled.

ctangora
Contributor III

A second case use of this is to have the script run to check the user state; is someone logged in, is the lock screen up, are there more than one person logged into the computer, is it a the login window? Then have a policy kicked off according to the result.