new Grafana host

This commit is contained in:
Tommaso Piccioli 2016-05-10 16:31:42 +02:00
parent efc1bf6e0f
commit 74e1171063
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,7 @@
---
grafana_repo_key: https://packagecloud.io/gpg.key
grafana_repo: 'deb https://packagecloud.io/grafana/testing/debian/ wheezy main'
grafana_packages:
- grafana
grafana_enabled: True

View File

@ -0,0 +1,19 @@
---
- name: Install the grafana repo key
apt_key: url={{ grafana_repo_key }} state=present
tags: [ 'grafana', 'tick' ]
- name: Install the grafana deb repository
apt_repository: repo='{{ grafana_repo }}' state=present update_cache=yes
tags: [ 'grafana', 'tick' ]
- name: Install the grafana deb packages
apt: name='{{ item }}' state=present
with_items: '{{ grafana_packages }}'
tags: [ 'grafana', 'tick' ]
- name: Ensure that grafana is enabled and running
service: name=grafana-server state=started enabled=yes
when: grafana_enabled
tags: [ 'grafana', 'tick' ]