Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Request: Disable block for Automatically Remediation
-
Could we have an option on the "General Block" limiting the block from running, when the job is trigger because of Configuration drift?
Some installs or scripts might be a bit to extreme to run without some sort of manual approval (Running the job manually)
If this is possible, another option could be to disable the block for scheduled jobs as well.
-
I'm trying to understand the usecase a little better... are you using a Template Plan for both a Configuration and an Orchestration Job? Can you share a little more details?
An entire server is configured for automatic or manual remediation; so currently, it wouldn't be possible to say something like, "this piece of configuration should be automatically remediated, but this configuration should be manually remediated."
It would be easy to make a variable/function that does something like "if $IsConfigurationJobManuallyTriggered{ ... }", but then this would cause another problem: when drift is detected, and a server is set to auto-remediate, then the configuration plan will continuously run. We would need to consider and design something for this scenario.
Of course to disable a block, you can just do a "if false { }" and then the block will not run.
-
Yes, I suppose that I am trying to use the same job for configuration and orchestration.
I recently made a configuration plan that install Windows Features.
Some of these features requires a reboot of the server afterwards and I made the job just reboot if required.However I feel that during an automatic job, rebooting the server is a bit extreme and would like to avoid this.
-
Also in regards to "if $IsConfigurationJobManuallyTriggered{ ... }"
You could make the automatic remediation ignore any condition thats part of that block?
The server should still show as drifted, but the automatic remediation would not trigger on anything inside such a block.
-
What do you think of something like this? Of course it's not implemented, but just an idea...
if $IsCollectRun || !$IsAutomaticallyTriggered { Ensure-Something-That-Requires-Reboot(); }
So this way, the block would run during the collection run of the plan (which is where drift is detected/reported), and would only run if the job is manually triggered.