summaryrefslogtreecommitdiffstats
path: root/docker/ansible/roles
diff options
context:
space:
mode:
authorRadoslaw Jablonski <radoslawx.jablonski@intel.com>2018-10-05 14:33:01 +0100
committerAaron Smith <aasmith@redhat.com>2018-11-09 17:55:53 +0000
commitf5594d98506413090cc286bea59a667c5be32a2a (patch)
tree4f81157da1aff489d3eaf70fe3f1d4ede19e3fff /docker/ansible/roles
parent9ac248a08de1f197bafbabbf43175b30ab19ec32 (diff)
ansible: Fix custom 'influxdb_host' setting for grafana
Previously there were 2 errors in ansible scripts for grafana: - influxdb_host variable value was unset - entry for /etc/hosts file was adding text "{{ influxdb_hostname }}" instead hostname stored in this variable Change-Id: I1821b3c5f5fea5c29386b1a57e37aadcf90dd2e6 Signed-off-by: Radoslaw Jablonski <radoslawx.jablonski@intel.com> (cherry picked from commit 659840a7d99ecbacd767c10395a47615af415e63)
Diffstat (limited to 'docker/ansible/roles')
-rw-r--r--docker/ansible/roles/run_grafana/tasks/main.yml7
1 files changed, 5 insertions, 2 deletions
diff --git a/docker/ansible/roles/run_grafana/tasks/main.yml b/docker/ansible/roles/run_grafana/tasks/main.yml
index 97012495..230d6ec6 100644
--- a/docker/ansible/roles/run_grafana/tasks/main.yml
+++ b/docker/ansible/roles/run_grafana/tasks/main.yml
@@ -31,6 +31,9 @@
- rm_grafana_image
when: rm_images|default(false)|bool == true
+- set_fact:
+ influxdb_host_ip_mapping: "{ '{{ influxdb_hostname }}': '{{ influxdb_host_ip }}' }"
+
- name: launch barometer-grafana container
docker_container:
name: bar-grafana
@@ -40,9 +43,9 @@
ports:
- 3000:3000
env:
- "{{ influxdb_host }}": "{{ influxdb_hostname }}"
+ influxdb_host: "{{ influxdb_hostname }}"
etc_hosts:
- "{{ influxdb_hostname }}": "{{ influxdb_host_ip }}"
+ "{{ influxdb_host_ip_mapping }}"
detach: yes
restart: yes
network_mode: host