[Casper] Chain Policies Together
Criss Myers
cmyers at uclan.ac.uk
Fri Apr 3 09:32:13 PDT 2009
ok how about this?
create your policys as normal but set them to custom trigger
policy a = customTrigger1
policy b = customTrigger2
policy c = customTrigger3
etc, i think you get the point
then create a login policy that runs a script
in the script run the
jamf policy -trigger customTrigger1
sleep 1
jamf policy -trigger customTrigger2
etc etc and it would run one after the other
or of course use just 1 custom trigger and name you policys alphabetically and just trigger 1, then it will exectue 1 after the other
I do this with reimage scripts, i re-image the client and then via a smartgroup run a custom trigger called "ReImage" that runs all my post image settings 1 after the other, and i have about 8-10 post image scripts, such as set efi password, reset root password, join to OD groups etc etc
Criss
Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054
>>> Steve Wood <swood at integerdallas.com> 03/04/09 5:24 PM >>>
I'm sure there is a very easy way to do this (dummy receipts?), but wanted
to see how y'all would do it.
I am looking to re-number our network here and need to change the printers
on everyone's machines. So I would have to remove all printers and then add
back the printers for each machine. I know I can remove the printers via a
login policy, and I can add the printers via a login policy, but how can I
do both at the same time?
I'm thinking it will require two policies, but how can I set one policy to
fire after another policy? In my joke about dummy receipts above, it seems
that might be the easiest thing:
- fire a login policy that removes all printers and drops an empty package
on the machine
- set another policy to trigger when that receipt is found
Now, my mind is saying it won't work because the second policy won't
recognize the receipt soon enough. Thoughts?
My other idea for handling this is to simply move the printers.conf file in
a shell script that fires before the rest of the policy, and then add the
printers in the policy. I'm going to test this one out:
#!/bin/bash/
mv /etc/cups/pritners.conf pritners.conf.old
killall -HUP cupsd
exit 0
If I set that to "before" will it run and then the printers get re-added via
the policy?
Any other ideas for this?
Steve Wood
Director of IT
swood at integerdallas.com
The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475
More information about the Casper
mailing list