I’m new to Ansible and am trying to use data from querying a postgres DB to write out a Datadog agent config. I’ve figured out 1) how to retrieve the data from postgres and 2) write out a single static node’s agent config, but I haven’t figured out how to tie the two together. Any help would be GREATLY appreciated.
Here’s my code: