From 741158359b5eca7dda97fb42485d5d3ac1ae36bd Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Tue, 24 Jul 2018 15:16:24 -0400 Subject: [PATCH] Check for grafana api key Check to see if grafana_apikey is set before settting up the dashboards. Otherwise, the dashboard setup will fail. Change-Id: I629cd29eac49489d21e19323bbea7d33c9c370f2 Signed-off-by: Chuck Short --- ansible/install/roles/grafana-dashboards/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/install/roles/grafana-dashboards/tasks/main.yml b/ansible/install/roles/grafana-dashboards/tasks/main.yml index 0809a781a..116178aaa 100644 --- a/ansible/install/roles/grafana-dashboards/tasks/main.yml +++ b/ansible/install/roles/grafana-dashboards/tasks/main.yml @@ -3,6 +3,12 @@ # Generate & Upload Browbeat OpenStack Grafana Dashboards # +# check that grafana_apikey is entered prior to playbook run +- name: Check Grafana API key + fail: + msg="** Edit grafana_apikey in ../install/group_vars/all.yml before running **" + when: grafana_apikey is none + - name: Check Cloud Name fail: msg: "The Cloud name {{dashboard_cloud_name}} is reserved for a service, please use a different one"