{% import 'macros.j2' as macros with context %} # datasources for grafana # managed by Ansible apiVersion: 1 datasources: {% call(h) macros.loop_valid_hosts("servers") %} - name: {{ h.ansible_host }}-prometheus type: prometheus url: http://{{ h.ip.in }}:9090 - name: {{ h.ansible_host }}-loki type: prometheus {% endcall %}