From 1006dab986946de4a7ce9cdb16559dd921263b22 Mon Sep 17 00:00:00 2001
From: Duncan Martin Walker <Duncan.Walker02@bbc.co.uk>
Date: Tue, 7 Jan 2020 10:34:25 +0000
Subject: [PATCH] Updates to Grafana role

The inclusion of the grafana submodule contradicts the deployment
process in the README, where it is explicitly cloned to
/etc/ansible/roles. The empty folder for the submodule takes
higher precendence than explicit clone, meaning that the grafana
role is found, but contains no tasks. The submodule has been
deleted to stop this.

There are also failures when running behind a proxy in the
traefik-common role, These are now avoided by running the role
with deployment_environment_variables set.

Change-Id: Icc34087e17906c763286b98591bade73fa7c022e
---
 grafana/installGrafana.yml | 1 +
 grafana/roles/grafana      | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
 delete mode 160000 grafana/roles/grafana

diff --git a/grafana/installGrafana.yml b/grafana/installGrafana.yml
index 9e7c4171..88c5a61d 100644
--- a/grafana/installGrafana.yml
+++ b/grafana/installGrafana.yml
@@ -138,6 +138,7 @@
 
   roles:
     - role: traefik_common
+      environment: "{{ deployment_environment_variables | default({}) }}"
       traffic_dashboard_bind: "{{ hostvars[inventory_hostname]['ansible_' ~ (ansible_default_ipv4['interface'] | replace('-', '_') | string)]['ipv4']['address'] }}"
       traefik_dashboard_enabled: true
       traefik_destinations:
diff --git a/grafana/roles/grafana b/grafana/roles/grafana
deleted file mode 160000
index 4f23cfe4..00000000
--- a/grafana/roles/grafana
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4f23cfe48054792f0c84255b64dbe09a82744e20