Hello there,

I'm trying to make a role that can dynamically generate the YAML config 
files for my app (The app is Data Dog's agent). Ex: I want my Jinja2 
template to render valid YAML, the contents of which are coming from 
Ansible vars, which themselves are defined via YAML. This is equivalent to 
the pattern that https://github.com/jdauphant/ansible-role-nginx uses for 
translating Ansible vars into nginx config files.

Is there an easy way to do this? Am I thinking about this all wrong?

Sample YAML config file for Datadog that I would like to have dynamically 
generated from equivalent Ansible vars:

> ---
> init_config:


> instances:
>     # For every instance, you have an `nginx_status_url` and (optionally)
>     # a list of tags.
>     -   nginx_status_url: http://example.com/nginx_status/
>         tags:
>             -   instance:foo
>     -   nginx_status_url: http://example2.com:1234/nginx_status/
>         tags:
>             -   instance:bar


Thanks,
Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/98732516-d2d0-46b5-a4ff-6b384ea814ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to