- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ] labels: instance: '{{ target.instance }}' __metrics_path__: '/whawty-nginx-sso/{{ target.config.instance_name }}' {% for name, value in prometheus_target_labels.items() %} {{ name }}: '{{ value }}' {% endfor %}