From 91dbd09353360a44a0033fa526237ad6a1c3f1ef Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 9 Jul 2018 23:42:33 -0500 Subject: [PATCH] Tune vars to better support an isolated deployment Change-Id: I93d33bed42976d20919f887ef8096b212a6559a2 Signed-off-by: Kevin Carter --- elk_metrics_6x/setupKibanaDashboard.yml | 2 +- elk_metrics_6x/vars/variables.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/elk_metrics_6x/setupKibanaDashboard.yml b/elk_metrics_6x/setupKibanaDashboard.yml index 09b7aea4..47d6c3f6 100644 --- a/elk_metrics_6x/setupKibanaDashboard.yml +++ b/elk_metrics_6x/setupKibanaDashboard.yml @@ -34,4 +34,4 @@ dest: /tmp/openstack-log-dashboard.json - name: Upload Custom Openstack Log Dashboard - shell: "/opt/elasticdump/node_modules/elasticdump/bin/elasticdump --input=/tmp/openstack-log-dashboard.json --output={{ kibana_index_on_elasticsearch }} --type=data" + shell: "/opt/elasticdump/node_modules/elasticdump/bin/elasticdump --input=/tmp/openstack-log-dashboard.json --output={{ kibana_index_on_elasticsearch }} --type=data" diff --git a/elk_metrics_6x/vars/variables.yml b/elk_metrics_6x/vars/variables.yml index afc9cbce..ae51514f 100644 --- a/elk_metrics_6x/vars/variables.yml +++ b/elk_metrics_6x/vars/variables.yml @@ -26,7 +26,12 @@ elastic_packetbeat_retention: 3 # This is the URL external services can use to communicate with the # elasticsearch cluster. -elastic_vip_url: "http://{{ internal_lb_vip_address is defined | ternary(internal_lb_vip_address + ':' + (elastic_hap_port | string), hostvars[groups['kibana'][0]]['ansible_host'] + ':' + (elastic_port | string)) }}" +elastic_vip_url: >- + {% if internal_lb_vip_address is defined %} + http://{{ internal_lb_vip_address ~ ':' ~ elastic_hap_port }} + {% else %} + http://{{ hostvars[groups['kibana'][0]]['ansible_host'] ~ ':' ~ elastic_port }} + {% endif %} # kibana vars kibana_interface: 0.0.0.0 @@ -35,7 +40,7 @@ kibana_username: admin kibana_password: admin kibana_nginx_port: 81 kibana_server_name: "{{ ansible_hostname }}" -kibana_index_on_elasticsearch: "http://{{ hostvars[groups['elastic-logstash'][0]]['container_address'] }}:{{ elastic_port}}/.kibana" +kibana_index_on_elasticsearch: "http://{{ hostvars[groups['elastic-logstash'][0]]['ansible_host'] }}:{{ elastic_port}}/.kibana" # logstash vars logstash_beat_input_port: 5044