Use a compliance job with auto remediation
Normally you would target a deploy job against a server that you want to run whatever is in the blpackage on. so like ‘i need to install software X against this server’… so i’m not sure what you mean here. you don’t normally run things against a server unless there is some need. and i don’t normally install random software because there are a few gb of free space ☺
A disk space check is just a simple example ... more complex and I'd agree with Rich regarding the compliance and auto remediation.. ( imo a lot of baggage if we only need to check something simple then deploy ) targeting isn't anything random, I'm talking about joining up the dots here in the product. So you'd gather your target list from some where else ? that contained targets that meet criteria i.e. free space = x
I'm either not explaining myself every well here or you need to get out to enterprise customer sites more to see how things are done :-)
i think you are talking about pre-requsite checking ? so you have a list of servers that you will install X on. X requires certain things, so you want to check for those first and if the checks pass, then you will install the software on X ?
if that's the case then right now a compliance job is the way to do that. there should be an 'idea' created already for the condition checking in the blpackage/deploy job directly.
imo -- if you're looking to execute something based on how much diskspace is on a box, i would target all <OS> machines, do the diskspace check in compliance then auto remediate.
Another option is write your conditionals in a BLPackage external command and target all <OS> machines, if diskspace above threshold exit 0, if diskspace below threshold, execute some cleanup code
Both of these options give you the best chance to access live machine data to perform the query on and remediate when necessary
Try to write your content so that you can always target all machines, this gives you the best opportunity to have content work actively. Using properties to target smart groups can lead to unwanted machines in the list due to the staleness of property data.
You can do a compliance and remediation