role service-grafana: check prometheus_components instead of setting facts
This commit is contained in:
parent
9521fac988
commit
e79761e8d8
2 changed files with 1 additions and 2 deletions
|
@ -60,7 +60,7 @@
|
||||||
database: "yanic"
|
database: "yanic"
|
||||||
|
|
||||||
- name: add prometheus datasource
|
- name: add prometheus datasource
|
||||||
when: prometheus_present is defined
|
when: '"prometheus" in prometheus_components'
|
||||||
grafana_datasource:
|
grafana_datasource:
|
||||||
name: "prometheus"
|
name: "prometheus"
|
||||||
grafana_url: "http://localhost:3000"
|
grafana_url: "http://localhost:3000"
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
- name: set internal variables for convenience
|
- name: set internal variables for convenience
|
||||||
set_fact:
|
set_fact:
|
||||||
prometheus_present: yes
|
|
||||||
prometheus_daemon_dir: "{{ prometheus_install_path }}/prometheus-{{ prometheus_version }}.linux-amd64"
|
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"
|
prometheus_tarball_url: "https://github.com/prometheus/prometheus/releases/download/v{{ prometheus_version }}/prometheus-{{ prometheus_version }}.linux-amd64.tar.gz"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue