How to schedule jobs with dynamic IP requirements?

So we have requirements where certain jobs should NOT run on certain IPs. And conversely some that MUST run on other IPs.

Using constraints when the job is scheduled, this is possible. But if those IPs change (or the IP set membership changes) then things can drift.

I can only imagine this is solvable by the scheduler having a hook where it can externally ask “here is a job spec I’m about to schedule, do you want to change anything about it before I do so?”. The external program could then set the IP values correctly.

a) is that possible somehow?
b) is there a better way of solving this?

Thanks a lot in advance.