Make kibana user/pass variables.

This adds two new variables to ../install/group_vars/all.yml

kibana_user and kibana_password

Change-Id: I91b260e851ded3259ee39764356b30895eaf3acb
This commit is contained in:
Will Foster 2016-10-07 15:18:47 +01:00 committed by Sai Sindhur Malleni
parent 9ba928d615
commit a1a31ed87f
2 changed files with 12 additions and 8 deletions

View File

@ -148,13 +148,8 @@ browbeat_router_name: browbeat_router
########################################
# ELK Server Variables
########################################
### nginx ###
# add nonstandard port here for undercloud usage
# usage: port nginx listens to reverse-proxy Kibana
# e.g. 8888
nginx_kibana_port: 80
#
# usage: port filebeat client grabs the client SSL certificate
# port filebeat client grabs the client SSL certificate
# e.g. 9999
elk_server_ssl_cert_port: 8080
#
@ -181,7 +176,16 @@ fluentd_debug_port: 24230
es_ip:
es_local_port: 9200
es_listen_external: true
### kibana options ###
# change this to affect nginx-wrapped htpasswd authentication
kibana_user: admin
kibana_password: admin
es_kibana_index: .kibana
### kibana nginx ###
# add nonstandard port here for undercloud usage
# usage: port nginx listens to reverse-proxy Kibana
# e.g. 8888
nginx_kibana_port: 80
### install curator tool ###
# curator is the recommended tool for managing elasticsearch indexes
# https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html

View File

@ -80,7 +80,7 @@
register: kibana_dashboards_load_sh_present
- name: Configure kibana filebeat dashboards
shell: sh /tmp/beats-dashboards-master/load.sh -url "http://localhost:9200" -user "admin:admin"
shell: sh /tmp/beats-dashboards-master/load.sh -url "http://localhost:9200" -user "{{kibana_user}}:{{kibana_password}}"
ignore_errors: true
when: kibana_dashboards_load_sh_present != 0
tags:
@ -94,7 +94,7 @@
register: kibana_user_pwfile_exists
- name: Create kibana admin user
command: htpasswd -b -c /etc/nginx/htpasswd.users admin admin
command: htpasswd -b -c /etc/nginx/htpasswd.users {{kibana_user}} {{kibana_password}}
ignore_errors: true
when: kibana_user_pwfile_exists != 0