In ECE clients are enrolled with
elastic-agent enroll --url=example.com:9243 --enrollment-token=$token and then the rest is managed by Fleet.
However, I would like to enroll clients not with a command, but with a proper elastic-agent.yml file. Is this even a supported configuration path? I've tried to enroll clients by modifying the reference config with the URL and token, but no luck as it seems. The add agent window in Fleet also doesn't suggest an alternative way to install these clients. I prefer just setting up a config file, which makes configuration management much easier.
An alternative would be to run the enroll command, only if some sort of file is not present. This may work, but is not as straightforward as just updating a file and starting the daemon.