- hosts: - victoriametrics_servers gather_facts: true become: true roles: - victoriametrics - handlers - hosts: - grafana_servers gather_facts: true become: true tasks: - name: add datasources VictoriaMetrics ansible.builtin.include_role: name: handlers tasks_from: add_datasources.yml.ansible vars: grafana_datasources: name: "VictoriaMetrics" type: "prometheus" url: "http://{{ hostvars[groups['victoriametrics_servers'][0]]['victoriametrics_eth_vip'] }}:8428" access: "proxy" is_default: true version: 1 editable: false