Add transport hostname

This commit is contained in:
Mike Reeves
2020-08-10 23:02:03 -04:00
parent 730e389aae
commit ac3f490299
2 changed files with 4 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ discovery.zen.minimum_master_nodes: 1
path.logs: /var/log/elasticsearch path.logs: /var/log/elasticsearch
action.destructive_requires_name: true action.destructive_requires_name: true
transport.bind_host: {{ grains.host }} transport.bind_host: {{ grains.host }}
transport.publish_host: {{ NODEIP }} transport.publish_host: {{ grains.host }}
transport.publish_port: 9300 transport.publish_port: 9300
cluster.routing.allocation.disk.threshold_enabled: true cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 95% cluster.routing.allocation.disk.watermark.low: 95%

View File

@@ -16,6 +16,8 @@
{% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %} {% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %}
{% set MANAGER = salt['grains.get']('master') %} {% set MANAGER = salt['grains.get']('master') %}
{% set FEATURES = salt['pillar.get']('elastic:features', False) %} {% set FEATURES = salt['pillar.get']('elastic:features', False) %}
{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- if FEATURES is sameas true %} {%- if FEATURES is sameas true %}
{% set FEATUREZ = "-features" %} {% set FEATUREZ = "-features" %}
@@ -173,7 +175,7 @@ so-elasticsearch:
- name: so-elasticsearch - name: so-elasticsearch
- user: elasticsearch - user: elasticsearch
- extra_hosts: - extra_hosts:
- {{ grains.host }}:127.0.0.1 - {{ grains.host }}:{{ NODEIP }}
- environment: - environment:
- discovery.type=single-node - discovery.type=single-node
#- bootstrap.memory_lock=true #- bootstrap.memory_lock=true