Posted on 07-30-2012 03:40 PM
Is there any way to have a Configuration use a Policy instead of a Package to install things? It would be nice to just call a Policy (that already exists) since it can contain the scripts and packages together.
An example:
Let's assume each Policy contains one preflight script, one package and one postflight script. Trying to create the right order of operations to run three install Policies while keeping the order of pre and postflight scripts is extremely difficult.
Thanks,
Tom
Posted on 07-30-2012 04:03 PM
ahhh… casper limitations.
you could use a payload free pkg that uses its postflight to run policies in whatever order you want using 'jamf policy -id <id number>' or 'jamf policy -trigger <text trigger>.' be aware that if you do this during imaging, your policies/pkgs/scripts need to be written to target the newly imaged volume and not the netboot volume.
it's probably easier to set your policy to run on startup for machines within a scope, which should get you the same results.
Posted on 07-30-2012 04:12 PM
Thanks for the reply RPG.
I was trying to avoid needing multiple copies of the same policy with different triggers. I guess I will just dupe the existing ones and change to a Startup trigger.
Posted on 07-30-2012 08:48 PM
Hey Tom,
Policies can run scripts before or after a policy, that would be your pre and post flight. You can also use manual trigger policies to do whatever a policy can do from the command line. I have used these in post image shell scripts that run at first boot.
Could you give me a more in depth description of what you are trying to accomplish?
Thanks,
Tom
Posted on 07-31-2012 10:26 AM
Hence the reason I'm working standardize all of my packages in .pkg format...
.pkgs can contain pre- and post-flight scripts, pre-install scripts, etc.