run only on manager if truecluster enabled

This commit is contained in:
m0duspwnens
2021-08-05 09:50:51 -04:00
parent 52cb72ba67
commit 727a3742f5
4 changed files with 6 additions and 5 deletions

View File

@@ -237,7 +237,7 @@
{% do allowed_states.append('kibana') %} {% do allowed_states.append('kibana') %}
{% endif %} {% endif %}
{% if CURATOR and grains.role in ['so-eval', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode'] %} {% if CURATOR and grains.role in ['so-eval', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode', 'so-manager'] %}
{% do allowed_states.append('curator') %} {% do allowed_states.append('curator') %}
{% endif %} {% endif %}

View File

@@ -4,7 +4,7 @@
{% set VERSION = salt['pillar.get']('global:soversion', 'HH1.2.2') %} {% set VERSION = salt['pillar.get']('global:soversion', 'HH1.2.2') %}
{% 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') %}
{% if grains['role'] in ['so-eval', 'so-node', 'so-managersearch', 'so-heavynode', 'so-standalone'] %} {% if grains['role'] in ['so-eval', 'so-node', 'so-managersearch', 'so-heavynode', 'so-standalone', 'so-manager'] %}
{% from 'elasticsearch/auth.map.jinja' import ELASTICAUTH with context %} {% from 'elasticsearch/auth.map.jinja' import ELASTICAUTH with context %}
{% from "curator/map.jinja" import CURATOROPTIONS with context %} {% from "curator/map.jinja" import CURATOROPTIONS with context %}
# Curator # Curator

View File

@@ -2,8 +2,8 @@
{% set ENABLED = salt['pillar.get']('curator:enabled', True) %} {% set ENABLED = salt['pillar.get']('curator:enabled', True) %}
{% set TRUECLUSTER = salt['pillar.get']('elasticsearch:true_cluster', False) %} {% set TRUECLUSTER = salt['pillar.get']('elasticsearch:true_cluster', False) %}
# don't start the docker container if searchnode and true clustering is enabled or disabled via pillar # don't start the docker container if searchnode and true clustering is enabled or curator disabled via pillar or true cluster not enabled and manager
{% if (grains.id.split('_')|last == 'searchnode' and TRUECLUSTER) or not ENABLED %} {% if not ENABLED or (TRUECLUSTER and grains.id.split('_')|last == 'searchnode') or (not TRUECLUSTER and grains.id.split('_')|last == 'manager') %}
{% do CURATOROPTIONS.update({'start': False}) %} {% do CURATOROPTIONS.update({'start': False}) %}
{% do CURATOROPTIONS.update({'status': 'absent'}) %} {% do CURATOROPTIONS.update({'status': 'absent'}) %}
{% else %} {% else %}

View File

@@ -188,6 +188,7 @@ base:
{%- if KIBANA %} {%- if KIBANA %}
- kibana - kibana
{%- endif %} {%- endif %}
- curator
{%- if ELASTALERT %} {%- if ELASTALERT %}
- elastalert - elastalert
{%- endif %} {%- endif %}