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)
- 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
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