diff --git a/ansible/README.md b/ansible/README.md index e1b8415c2..25f0f9e38 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -93,6 +93,7 @@ the docker related settings will work with your target host. ##### Install grafana service Prior to installing grafana, please review install/group_vars/all.yml file and your ansible inventory file +You will need to define values for the grafana_host and graphite_host IP addresses here. ``` # ansible-playbook -i hosts install/grafana.yml ``` diff --git a/ansible/install/group_vars/all.yml b/ansible/install/group_vars/all.yml index 25515d60b..258cddaa4 100644 --- a/ansible/install/group_vars/all.yml +++ b/ansible/install/group_vars/all.yml @@ -67,7 +67,8 @@ grafana_docker_image: grafana/grafana:2.6.0 # Graphite Configuration ######################################## # Graphite Server ip address (Collectd -> Graphite server) -graphite_host: 1.1.1.1 +# you must fill out graphite_host prior to playbook execution +graphite_host: graphite_port: 80 # Graphite prefix / Cloud name used both with graphite and grafana dashboards graphite_prefix: openstack @@ -79,7 +80,8 @@ graphite_password: calvin # Grafana Dashboarding Configuration ######################################## # Grafana Server IP Address/Port (Can be hosted on the Graphite server) -grafana_host: 1.1.1.1 +# you must fill out grafana_host prior to playbook execution +grafana_host: grafana_port: 3000 grafana_username: admin grafana_password: admin diff --git a/ansible/install/roles/grafana/tasks/main.yml b/ansible/install/roles/grafana/tasks/main.yml index c5da54813..cf67ba45e 100644 --- a/ansible/install/roles/grafana/tasks/main.yml +++ b/ansible/install/roles/grafana/tasks/main.yml @@ -3,6 +3,12 @@ # Install/run grafana-server for browbeat # +# check that grafana_host and graphite_host is entered prior to playbook run +- name: Check Graphite/Grafana Host IP Address + fail: + msg="** Edit grafana_host and graphite_host in ../install/group_vars/all.yml before running **" + when: ((grafana_host is none) and (graphite_host is none)) + - name: Import EPEL GPG Key rpm_key: key=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 state=present