We want to install the Elastic Agent on our OS image so all servers have the agent by default. We want to have these agents not report metrics by default but have the ability to turn them on remotely and report to the fleet once they are turned on. Is this possible with Fleet? It seems like variables and conditions might be a way to accomplish this. if I could have the input depend on an environment variable called ELASTIC_ENABLED, and then change the environment variable via ansible or some other automation tool.
Variables and conditions in input configurations | Fleet and Elastic Agent Guide [8.13] | Elastic
Would that work? Is there a better way to do this?