Skip to content

Commit

Permalink
Merge "Fix grafana username and password not being set"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jan 12, 2017
2 parents cca1382 + 0118627 commit df01648
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ansible/install/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ graphite_port: 80
# Graphite prefix / Cloud name used both with graphite and grafana dashboards
graphite_prefix: openstack
# Graphite username and password for login on the dashboard
# credential aren't created when you deploy graphite, use manage.py
graphite_username: root
graphite_password: calvin

Expand All @@ -114,6 +115,10 @@ graphite_password: calvin
########################################
# Grafana Server IP Address/Port (Can be hosted on the Graphite server)
# you must fill out grafana_host prior to playbook execution
# If you are deploying grafana the username/password combination will be set
# (if you're using the grafana-docker playbook this does not currently work,
# it will deploy with admin/admin). If you're uploading dashboards be sure to
# set the password here to whatever it actually is.
grafana_host:
grafana_port: 3000
grafana_username: admin
Expand Down
10 changes: 8 additions & 2 deletions ansible/install/roles/grafana/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
- name: Import grafana GPG Key
rpm_key: key=https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
state=present
become: true
become: True

- name: Install grafana RPM
yum: name={{ item }} state=present
become: true
with_items:
- grafana

- name: Set grafana server port
- name: Set grafana config values
ini_file:
dest=/etc/grafana/grafana.ini
section={{item.section}}
Expand All @@ -42,6 +42,12 @@
- section: auth.anonymous
option: enabled
value: true
- section: security
option: admin_user
value: "{{grafana_username}}"
- section: security
option: admin_password
value: "{{grafana_password}}"
become: true

### begin firewall ###
Expand Down

0 comments on commit df01648

Please sign in to comment.