global: scrape_interval: 15s scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] - job_name: 'lab_nodes' static_configs: - targets: {% for host in groups['all_nodes'] %} - '{{ hostvars[host].ansible_host }}:9100' {% endfor %}