| - name: "download grafana rpm" |
| get_url: |
| args: |
| url: https://grafanarel.s3.amazonaws.com/builds/{{ grafana_rpm }} |
| dest: /tmp/{{ grafana_rpm }} |
| sha256sum: "{{ grafana_sha256 }}" |
| force: no |
| - name: "ensure grafana is installed" |
| yum: name=/tmp/{{ grafana_rpm }} state=present |
| - name: "configure grafana" |
| template: src=grafana.ini dest=/etc/grafana/grafana.ini |
| - name: "ensure dashboards directory exists" |
| file: path=/etc/grafana/dashboards state=directory owner=grafana group=grafana |
| - name: "add cluster dashboard configuration" |
| template: src=cluster-dashboard.json dest=/etc/grafana/dashboards/cluster-dashboard.json owner=grafana group=grafana |
| - name: "configure fluo dashboards" |
| get_url: url=https://raw.githubusercontent.com/apache/fluo/master/contrib/grafana/{{ item }} dest=/etc/grafana/dashboards/{{ item }} |
| with_items: |
| - fluo-recent-dashboard.json |
| - fluo-historical-dashboard.json |
| - name: "configure accumulo dashboards" |
| get_url: url=https://raw.githubusercontent.com/apache/fluo-uno/master/plugins/influx-metrics/accumulo-dashboard.json dest=/etc/grafana/dashboards/accumulo-dashboard.json |
| - name: "ensure owner and group are correct for /etc/grafana" |
| file: path=/etc/grafana/ recurse=yes owner=grafana group=grafana |
| - name: "ensure grafana is running (and enable it at boot)" |
| service: name=grafana-server state=started enabled=yes |
| notify: |
| - add datasources |