---
- name: grafana | add graphite as data source
uri:
url: http://{{ ansible_host }}:3000/api/datasources
method: POST
user: "{{ grafana_admin_user }}"
password: "{{ grafana_admin_password }}"
body: { "name":"grafite", "type":"graphite", "access":"proxy", "url":"http://{{ ansible_host }}/", "password":"", "user":"", "database":"", "basicAuth":true, "basicAuthUser":"", "basicAuthPassword":"", "withCredentials":false, "isDefault":true, "jsonData":null }
force_basic_auth: yes
status_code: 200
body_format: json
delegate_to: localhost
become: no