mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
Allow SNs to resolve the ES master
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||||
{% set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
{% set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||||
{% set TRUECLUSTER = salt['pillar.get']('elasticsearch:true_cluster', False) %}
|
{% set TRUECLUSTER = salt['pillar.get']('elasticsearch:true_cluster', False) %}
|
||||||
|
{% set MANAGERIP = salt['pillar.get']('global:managerip') %}
|
||||||
|
|
||||||
{% if FEATURES is sameas true %}
|
{% if FEATURES is sameas true %}
|
||||||
{% set FEATUREZ = "-features" %}
|
{% set FEATUREZ = "-features" %}
|
||||||
@@ -192,12 +193,17 @@ so-elasticsearch:
|
|||||||
- name: so-elasticsearch
|
- name: so-elasticsearch
|
||||||
- user: elasticsearch
|
- user: elasticsearch
|
||||||
- extra_hosts:
|
- extra_hosts:
|
||||||
- "{{ grains.host }}:{{ NODEIP }}"
|
- extra_hosts:
|
||||||
|
{% if ismanager %}
|
||||||
|
- {{ grains.host }}:{{ NODEIP }}
|
||||||
{% if salt['pillar.get']('nodestab', {}) %}
|
{% if salt['pillar.get']('nodestab', {}) %}
|
||||||
{% for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
{% for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
||||||
- "{{ SN.split('_')|first }}:{{ SNDATA.ip }}"
|
- {{ SN.split('_')|first }}:{{ SNDATA.ip }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
- {{ MANAGER }}:{{ MANAGERIP }}
|
||||||
|
{% endif %}
|
||||||
- environment:
|
- environment:
|
||||||
{% if TRUECLUSTER is sameas false or (TRUECLUSTER is sameas true and not salt['pillar.get']('nodestab', {})) %}
|
{% if TRUECLUSTER is sameas false or (TRUECLUSTER is sameas true and not salt['pillar.get']('nodestab', {})) %}
|
||||||
- discovery.type=single-node
|
- discovery.type=single-node
|
||||||
|
|||||||
Reference in New Issue
Block a user