scrape_configs:
- job_name: "freegeoip"
  scrape_interval: "15s"
  target_groups:
{% for host in groups['freegeoip'] %}
  - targets:
    - "{{ hostvars[host]['private_ip'] }}:8888"
    - "{{ hostvars[host]['private_ip'] }}:9100"
    labels:
      instance: "{{ host }}"
{% endfor %}

scrape_configs:
- job_name: "freegeoip"
  scrape_interval: "15s"
  target_groups:
{% for host in groups['freegeoip'] %}
  - targets:
    - "{{ hostvars[host]['private_ip'] }}:8888"
    labels:
      instance: "{{ host }}"
{% endfor %}
- job_name: "node"
  scrape_interval: "15s"
  target_groups:
{% for host in groups['freegeoip'] %}
  - targets:
    - "{{ hostvars[host]['private_ip'] }}:9100"
    labels:
      instance: "{{ host }}"
{% endfor %}

Update config to separate node and freegeoip jobs
Update config to separate node and freegeoip jobs
