From a1a31ed87f0edaf7e7fc960b69045b8cde48f311 Mon Sep 17 00:00:00 2001 From: Will Foster Date: Fri, 7 Oct 2016 15:18:47 +0100 Subject: [PATCH] Make kibana user/pass variables. This adds two new variables to ../install/group_vars/all.yml kibana_user and kibana_password Change-Id: I91b260e851ded3259ee39764356b30895eaf3acb --- ansible/install/group_vars/all.yml | 16 ++++++++++------ ansible/install/roles/kibana/tasks/main.yml | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ansible/install/group_vars/all.yml b/ansible/install/group_vars/all.yml index 071c14147..66c98ef3c 100644 --- a/ansible/install/group_vars/all.yml +++ b/ansible/install/group_vars/all.yml @@ -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 diff --git a/ansible/install/roles/kibana/tasks/main.yml b/ansible/install/roles/kibana/tasks/main.yml index 8dc35df8e..230acd65e 100644 --- a/ansible/install/roles/kibana/tasks/main.yml +++ b/ansible/install/roles/kibana/tasks/main.yml @@ -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