- targets: [ '{{ (target.instance == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.instance].prometheus_scrape_endpoint) }}' ] labels: instance: '{{ target.instance }}'