How to include config files for the Google Ops-agent

769 Views Asked by At

I want to do some configurations for Google Cloud Ops-Agent in order to deploy it via Ansible. For example /etc/google-cloud-ops-agent/kafka.yaml How to include *.yaml configs? If using /etc/google-cloud-ops-agent/config.yaml I'm worried then the configuration will be overwritten

1

There are 1 best solutions below

1
On

There are two ways I can think of to do this.

The easiest (and least precise): use the copy module to recusively copy the the directory content to the target. Of course, if there are files other than ".yaml", you'll get those as well.

The more complex way...and I have not tested this. use the find module to execute locally on the control node, to get a list of the .yaml files, register their locations and then copy them up. There's probably a simpler way.