global: scrape_interval: 10s scrape_configs: - job_name: "node" static_configs: - targets: ["localhost:3000"] {% if 'compute' in groups %} {% for host in groups['compute'] %} - targets: ["{{ hostvars[host]['ansible_fqdn'] }}:9100"] labels: fqdn: "{{ hostvars[host]['ansible_fqdn'] }}" {% endfor %} {% endif %}