role service-grafana: check prometheus_components instead of setting facts

This commit is contained in:
Julian Labus 2018-09-24 15:12:15 +02:00
parent 9521fac988
commit e79761e8d8
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A
2 changed files with 1 additions and 2 deletions

View file

@ -60,7 +60,7 @@
database: "yanic"
- name: add prometheus datasource
when: prometheus_present is defined
when: '"prometheus" in prometheus_components'
grafana_datasource:
name: "prometheus"
grafana_url: "http://localhost:3000"

View file

@ -5,7 +5,6 @@
- name: set internal variables for convenience
set_fact:
prometheus_present: yes
prometheus_daemon_dir: "{{ prometheus_install_path }}/prometheus-{{ prometheus_version }}.linux-amd64"
prometheus_tarball_url: "https://github.com/prometheus/prometheus/releases/download/v{{ prometheus_version }}/prometheus-{{ prometheus_version }}.linux-amd64.tar.gz"