m0duspwnens
2020-05-01 15:37:54 -04:00
parent 174b353ce0
commit 2dd2289c94
3 changed files with 24 additions and 26 deletions

View File

@@ -1,7 +1,6 @@
base: base:
'*': '*':
- patch.needs_restarting - patch.needs_restarting
- docker.config
'*_eval or *_helix or *_heavynode or *_sensor': '*_eval or *_helix or *_heavynode or *_sensor':
- match: compound - match: compound

View File

@@ -7,7 +7,6 @@
'so-kratos', 'so-kratos',
'so-idstools', 'so-idstools',
'so-elasticsearch', 'so-elasticsearch',
'so-logstash',
'so-kibana', 'so-kibana',
'so-steno', 'so-steno',
'so-suricata', 'so-suricata',

View File

@@ -1,10 +1,10 @@
{% set role = grains.id.split('_') | last %} {% set role = grains.id.split('_') | last %}
{% from 'common/map/'~ role ~'.map.jinja' import docker with context %} {% from 'common/maps/'~ role ~'.map.jinja' import docker with context %}
# Check if the service is enabled and append it's required containers # Check if the service is enabled and append it's required containers
# to the list predefined by the role / minion id affix # to the list predefined by the role / minion id affix
{% macro append_containers(pillar_name, k, compare )%} {% macro append_containers(pillar_name, k, compare )%}
{% if salt['pillar.get'](pillar_name~':'~k, {}) != %} {% if salt['pillar.get'](pillar_name~':'~k, {}) != compare %}
{% from 'common/maps/'~k~'.map.jinja' import docker as d with context %} {% from 'common/maps/'~k~'.map.jinja' import docker as d with context %}
{% for li in d['containers'] %} {% for li in d['containers'] %}
{{ docker['containers'].append(li) }} {{ docker['containers'].append(li) }}
@@ -19,13 +19,13 @@
},grain='id', merge=salt['pillar.get']('docker')) %} },grain='id', merge=salt['pillar.get']('docker')) %}
{% if role == 'eval' %} {% if role == 'eval' %}
{{ append_containers('master', 'grafana', '0') }} {{ append_containers('master', 'grafana', 0) }}
{{ append_containers('static', 'fleet_master', '0') }} {{ append_containers('static', 'fleet_master', 0) }}
{{ append_containers('master', 'wazuh', '0') }} {{ append_containers('master', 'wazuh', 0) }}
{{ append_containers('master', 'thehive', '0') }} {{ append_containers('master', 'thehive', 0) }}
{{ append_containers('master', 'playbook', '0') }} {{ append_containers('master', 'playbook', 0) }}
{{ append_containers('master', 'freq', '0') }} {{ append_containers('master', 'freq', 0) }}
{{ append_containers('master', 'domainstats', '0') }} {{ append_containers('master', 'domainstats', 0) }}
{% endif %} {% endif %}
{% if role == 'heavynode' %} {% if role == 'heavynode' %}
@@ -33,27 +33,27 @@
{% endif %} {% endif %}
{% if role == 'mastersearch' %} {% if role == 'mastersearch' %}
{{ append_containers('master', 'grafana', '0') }} {{ append_containers('master', 'grafana', 0) }}
{{ append_containers('static', 'fleet_master, '0'') }} {{ append_containers('static', 'fleet_master', 0) }}
{{ append_containers('master', 'wazuh', '0') }} {{ append_containers('master', 'wazuh', 0) }}
{{ append_containers('master', 'thehive', '0') }} {{ append_containers('master', 'thehive', 0) }}
{{ append_containers('master', 'playbook', '0') }} {{ append_containers('master', 'playbook', 0) }}
{{ append_containers('master', 'freq', '0') }} {{ append_containers('master', 'freq', 0) }}
{{ append_containers('master', 'domainstats', '0') }} {{ append_containers('master', 'domainstats', 0) }}
{% endif %} {% endif %}
{% if role == 'master' %} {% if role == 'master' %}
{{ append_containers('master', 'grafana', '0') }} {{ append_containers('master', 'grafana', 0) }}
{{ append_containers('static', 'fleet_master', '0') }} {{ append_containers('static', 'fleet_master', 0) }}
{{ append_containers('master', 'wazuh', '0') }} {{ append_containers('master', 'wazuh', 0) }}
{{ append_containers('master', 'thehive', '0') }} {{ append_containers('master', 'thehive', 0) }}
{{ append_containers('master', 'playbook', '0') }} {{ append_containers('master', 'playbook', 0) }}
{{ append_containers('master', 'freq', '0') }} {{ append_containers('master', 'freq', 0) }}
{{ append_containers('master', 'domainstats', '0') }} {{ append_containers('master', 'domainstats', 0) }}
{% endif %} {% endif %}
{% if role == 'searchnode' %} {% if role == 'searchnode' %}
{{ append_containers('master', 'wazuh', '0') }} {{ append_containers('master', 'wazuh', 0) }}
{% endif %} {% endif %}
{% if role == 'sensor' %} {% if role == 'sensor' %}