Reputation: 4950
I have a task that needs to run in QA and prod, but not dev. The task is to stop a clustered application. The problem is that the dev servers aren’t clustered and the task to stop the cluster fails on these servers. Is there a way to handle this?
Upvotes: 1
Views: 79
Reputation: 34325
We used to have that issue as well. When the task ran to stop the cluster, it would fail in dev:
The system cannot find the path specified C:\Windows\Sysnative\Cluster.exe /cluster:server resource "Company Name Product" /offline
To get this to work, we can move the cluster commands to variables instead of directly in the task. That way we can have the dev version of stopping the cluster just do a no-op: cmd /exit
. The QA version will run the real cluster stop command.
Task:
Dev Server Variable Group:
QA Server Variable Group:
Upvotes: 1