We are in the process of automating our VM provisioning process, which includes Linux VMs that run CheckMK agents. Ideally, we do not want to have to log into the new VM nor do we want to share the automation-user password with that VM. Everything is done at first-boot using cloud-init.
Our provisioning server is able to run cmk-agent-ctl proxy-register to create the configuration, which is then stored in the userdata of cloud-init and then used by the CheckMK agent. Great!
However, cmk-update-agent register is a bit more difficult. Is there a way to run this command on our local machine that has the credentials, which generates the config file (like it does with cmk-agent-ctl proxy-register) that we then transfer onto the new VM? It doesn’t seem like cmk-update-agent allows us to configure its output path (or ideally stdout for piping).
Any recommendations?