dont always add curator to so-status

This commit is contained in:
m0duspwnens
2021-08-13 16:19:41 -04:00
parent e72ad9eb5a
commit cd0b9bbe4a
2 changed files with 8 additions and 2 deletions

View File

@@ -140,6 +140,7 @@ so-curator:
- force: True
{% endif %}
{% if CURATOROPTIONS.manage_so-status %}
append_so-curator_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
@@ -157,6 +158,7 @@ delete_so-curator_so-status.disabled:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-curator$
{% endif %}
{% endif %}
# Begin Curator Cron Jobs

View File

@@ -1,11 +1,15 @@
{% set CURATOROPTIONS = {} %}
{% set ENABLED = salt['pillar.get']('curator:enabled', True) %}
{% set TRUECLUSTER = salt['pillar.get']('elasticsearch:true_cluster', False) %}
{% do CURATOROPTIONS.update({'manage_so-status': True}) %}
# 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 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({'status': 'absent'}) %}
{% if (TRUECLUSTER and grains.id.split('_')|last == 'searchnode') or (not TRUECLUSTER and grains.id.split('_')|last == 'manager') %}
{% do CURATOROPTIONS.update({'manage_so-status': False}) %}
{% endif %}%}
{% else %}
{% do CURATOROPTIONS.update({'start': True}) %}
{% do CURATOROPTIONS.update({'status': 'running'}) %}